10  .TITLE "HELLO WORLD"
20  .OPT OBJ
30  *=$4000
40 EOL = $9B
50 ; *** SETUP ICCOM2 ***
60 OPEN  =  $03
70 WRITE =  $08
80 PUTREC = $09
90 PUTCHR = $0B
0100 CLOSE = $0C
0110 IOCB  = $0340
0120 ICCOM = $0342
0130 ICBAL = $0344
0140 ICBAH = $0345
0150 ICBLL = $0348
0160 ICBLH = $0349
0170 ICAX1 = $034A
0180 ICAX2 = $034B
0190 CIOV  = $E456
0200 DEVNAM .BYTE "E:",EOL
0210 MYTEXT .BYTE "HELLO WORLD!",EOL
0220 ;
0230 OPENSCR
0240  LDX #$20
0250  LDA #OPEN
0260  STA ICCOM,X
0270 ;
0280  LDA #DEVNAM&255
0290  STA ICBAL,X
0300  LDA #DEVNAM/256
0310  STA ICBAH,X
0320 ;
0330 ; SET SCREEN FOR WRITE OPERATION
0340  LDA #WRITE
0350  STA ICAX1,X
0360  LDA #$00
0370  STA ICAX2,X
0380  JSR CIOV
0390 ;
0400 ; SET PUT RECORD
0410  LDA #PUTREC
0420  STA ICCOM,X
0430 ;
0440 ; SET TEXT BUFFER
0450  LDA #MYTEXT&255
0460  STA ICBAL,X
0470  LDA #MYTEXT/256
0480  STA ICBAH,X
0490 ;
0500 ; PRINT MESSAGE TO SCREEN
0510  LDA #$00
0520  STA ICBLL,X
0530  LDA #$FF
0540  STA ICBLH,X
0550 ;
0560 ;
0570  LDA #$FF
0580  STA $02FC
0590 LOOP JSR CIOV
0600  LDA $02FC
0610  CMP #$FF
0620  BNE QUIT
0630  JMP LOOP
0640 ;
0650 ERROR BRK
0660 QUIT BRK
0670  .END
