home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 4: Demo 1
/
almathera_demo1.bin
/
sourcecode
/
dexion
/
fct3.s
< prev
next >
Wrap
Text File
|
1995-03-17
|
2KB
|
109 lines
openlib=-408
closelib=-414
execbase=4
open=-30
close=-36
read=-42
mode_old=1005
opendvice=-444
closedev=-450
sendio=-462
abortio=-480
translate=-30
init:
move.l execbase,a6
lea dosname,a1
moveq #0,d0
jsr openlib(a6)
move.l d0,dosbase
beq error
lea transname,a1
clr.l d0
jsr openlib(a6)
move.l d0,tranbase
beq error
lea talkio,a1
move.l #nwrrep,14(a1)
move.l #amaps,48+8(a1)
move #4,48+12(a1)
move.l #512,36(a1)
move #3,28(a1)
move.l #outtext,40(a1)
clr.l d0
clr.l d1
lea nardevice,a0
jsr open
tst.l d0
bne error
move.l #consolname,d1
move.l #mode_old,d2
move.l dosbase,a6
jsr open(a6)
tst.l d0
beq error
move.l d0,conhandle
move.l #intext,d2
bsr pline
sayit:
lea intext,a0
move.l #outtext-intext,d0
lea outtext,a1
move.l #512,d1
move.l tranbase,a6
jsr translate(a6)
lea talkio,a1
move.l #512,36(a1)
move.l execbase,a6
jsr sendio(a6)
bsr readchr
quit:move.l execbase,a6
lea talkio,a1
jsr abortio(a6)
move.l conhandle,d1
move.l dosbase,a6
jsr close(a6)
move.l dosbase,d1
move.l execbase,a6
jsr closelib(a6)
lea talkio,a1
jsr closedev(a6)
move.l tranbase,a1
jsr closelib(a6)
rts
pline:
bsr pmsg
pmsg:
move.l d2,a0
clr d3
readchr:
move.l #inline,d2
move.l dosbase,a6
move.l conhandle,d1
jsr read(a6)
rts
error:
move.l #-1,d7
text: dc.b 'dette er en prqve tekst',10,13,10,13,0,0
dosname: dc.b 'dos.library',0,0
transname: dc.b "translator.library",0
consolname: dc.b 'raw:0/100/640/100/**Test-vindue',0
nardevice: dc.b 'narrator-device',0
even
dosbase: dc.l 0
tranbase: dc.l 0
amaps: dc.b 3,5,10,12
even
conhandle: dc.l 0
talkio: blk.l 20,0
nwrrep: blk.l 8,0
intext: dc.b 'hello, i am the amiga talking to you',0
even
outtext: blk.l 512,0
inline: blk.l 80,0