;test for INPUT/OUTPUT functions ;to enable data streams type from COMMAND window ; INPUT data_1 ;this will open input file ; OUTPUT term ;this will redirect data to the window ; OUTPUT term -a ;this will send ASCII data to the window org x:0 TST1: DC 'T','e','s','t',' ','o','f',' ','A','S','C','I','I',' ','I','/','O',13,10 DC 'L','i','n','e',' ','2',13,10 DC 13,10 DC 'L','i','n','e',' ','4',13,10 DC '*','*','*',' ','T','e','s','t',' ','f','i','n','i','s','h','e','d',' ','*','*','*' TST2: org p:$0000 ; Program block starts at zero jmp START ; Skip over interrupt vectors org p:$0040 START: ;input data from PC move #$0100,r0 ; start address to load data move #$10004,x0 ; 4 words from file #1 move #$8001,r1 ; X memory space, input direction debug ; invoke emulator service move #$0108,r0 ; start address to load data move #$10004,x0 ; 4 words from file #1 move #$8001,r1 ; X memory space, input direction debug ; invoke emulator service ; modify received data move #$678900,b move x:(r0),a add b,a move a,x:(r0)+ move x:(r0),a add b,a move a,x:(r0)+ move x:(r0),a add b,a move a,x:(r0)+ move x:(r0),a add b,a move a,x:(r0)+ ;output data to PC move #$0100,r0 ; start address to xfer data move #$10004,x0 ; 4 words to file #1 move #$4001,r1 ; X memory space, output direction debug ; invoke emulator service move #TST1,r0 ; start address to xfer data move #$20000+TST2-TST1,x0 ; xfer text to file #2 move #$4001,r1 ; X memory space, output direction debug ; invoke emulator service STOP: nop jmp STOP end