ack/mach/z80/libmon/head_em.s

85 lines
973 B
ArmAsm
Raw Normal View History

1985-04-01 14:44:26 +00:00
.define EARRAY,ERANGE,EILLINS,EILLSIZE,ECASE,EMON,EHEAP
.define hol0,trapproc,trpim,argv,hp,.reghp,envp,begbss,ignmask
.define savebc,savede,savehl,saveix,saveaf,saveiy,ebadmon
1987-02-02 12:44:39 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1985-04-01 14:44:26 +00:00
EARRAY = 0
ERANGE = 1
EHEAP = 17
EILLINS=18
EILLSIZE=19
ECASE=20
EMON=25
ebadmon=25
1987-02-02 12:44:39 +00:00
.sect .text
1985-04-01 14:44:26 +00:00
1987-02-02 12:44:39 +00:00
! clear .sect .bss
1985-04-01 14:44:26 +00:00
ld sp,0x7ffe !address of fbase
ld de,endbss
ld h,d
ld l,e
ld bc,begbss
sbc hl,bc
ld a,h
or l
jr z,1f
2:
xor a
ld (de),a
dec de
dec hl
ld a,h
or l
jr nz,2b
1: ! hl == 0
ld bc,envp
push bc
ld bc,argv
push bc
ld bc,1
push bc
1991-03-06 14:26:16 +00:00
call __m_a_i_n
1985-04-01 14:44:26 +00:00
jp 0x20
1987-02-02 12:44:39 +00:00
.sect .bss
1985-04-01 14:44:26 +00:00
begbss:
1987-02-02 12:44:39 +00:00
.sect .data
1985-04-01 14:44:26 +00:00
hol0:
1987-02-02 12:44:39 +00:00
.data2 0,0
.data2 0,0
1985-04-01 14:44:26 +00:00
saveaf:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
savebc:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
savede:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
savehl:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
saveix:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
saveiy:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
ignmask:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
hp:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
trapproc:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
trpim:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
argv:
1987-02-02 12:44:39 +00:00
.data2 3f
1985-04-01 14:44:26 +00:00
envp:
1987-02-02 12:44:39 +00:00
.data2 0
1985-04-01 14:44:26 +00:00
3:
.asciz 'PROGRAM'
.reghp:
1987-02-02 12:44:39 +00:00
.data2 endbss