ForumsCodeASMdoslibrary load save RSS

 

aLpHa oNe

Simply use the functions OPEN, CLOSE, READ, WRITE. :-)

Added 16 minutes later:

Typed in some lines, not tested...

move.l 4.w,a6
lea doslib(pc),a1
jsr -408(a6)
move.l d0,a6

move.l #file,d1
move.l #1006,d2; Mode NEWFILE
jsr -30(a6); Open()
beq.b endit

move.l d0,handle
move.l d0,d1; Filehandle
move.l #buffer,d2; Buffer to write
move.l #17,d3; Size
jsr -48(a6); Write()

move.l handle(pc),d1
jsr -36(a6) ; Close
endit: rts

file: dc.b"dh1:myfile",0
even
handle: dc.l0
buffer: dc.b"flashtro rules!!!",0
doslib: dc.b"dos.library",0

This post was edited by aLpHa oNe (2015-07-19 15:11, 1 year ago)