|
Atari coding BBS
Re: GEMDos |
Posted by: Bod/STAX
|
Feb,18.2012-12:12
|
This is the routine:
bsr fcreate
start
move.l file_pos,a0
move.l (a0)+,d7
cmp.l #-1,d7
beq.s exit
move.l a0,file_pos
bsr read_file
bsr write_file
bra start
exit move.w handle2,-(sp)
move.w #$3e,-(sp)
trap #1
addq.w #4,sp
clr.w -(sp)
trap #1
read_file
clr.w -(sp)
move.l d7,-(sp)
move.w #$3d,-(sp)
trap #1
addq.w #8,sp
move.w d0,handle1
pea buffer
move.l #$fffff,-(sp)
move.w handle1,-(sp)
move.w #$3f,-(sp)
trap #1
lea 12(sp),sp
move.l d0,bytes
move.w handle1,-(sp)
move.w #$3e,-(sp)
trap #1
addq.w #4,sp
rts
fcreate
clr.w -(sp)
pea output_name
move,w #$3c,-(sp)
trap #1
addq.w #8,sp
move.l d0,handle2
rts
write_file
pea buffer
move.l bytes,-(sp)
move.w handle2,-(sp)
move.w #$40,-(sp)
trap #1
lea 12(sp),sp
rts
output_name
dc.b "output.dat",0
even
file1 dc.b "file1.dat",0
even
file2 dc.b "file2.dat",0
even
file_pos
dc.l file_tab
file_tab
dc.l file1,file2,-1
buffer
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|