Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

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]

Topic Posted by  Date 
GEMDos Bod/STAX Feb,17.2012-18:03
  Re: GEMDos ggn Feb,18.2012-08:35
    Re: GEMDos Bod/STAX Feb,18.2012-12:12
      Re: GEMDos evil Feb,18.2012-12:37
        Re: GEMDos Bod/STAX Feb,18.2012-13:37
          Re: GEMDos ggn Feb,18.2012-18:31
            Re: GEMDos Bod/STAX Feb,18.2012-19:22
              Re: GEMDos grazey Feb,19.2012-17:26


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

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.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson