this program should read from the file and prints out the content of the file in the output window, but it doesnt work. Can anyone tell me what the problem is and how can i fix it, thanks!!!
Code:
ORG $1000
START: ; first instruction of program
lea filename,a1
move #51,d0 open test.txt file
trap #15
lea buffer,a1
move #900,d2 # bytes to read
move #53,d0 read from file
trap #15
move #14,d0 output the context of file
lea buffer,a1
trap #15
move #50,d0
trap #15 close all files
MOVE.B #9,D0
TRAP #15 Halt Simulator
filename dc.b 'test.txt',0
buffer ds.b 80
END $800