ack/mach/i386/libsys/head_em.s

62 lines
902 B
ArmAsm
Raw Normal View History

1989-10-10 11:40:55 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
1991-03-06 14:26:16 +00:00
.define begtext,begdata,begbss
1989-10-10 11:40:55 +00:00
.define hol0,.reghp,.limhp,.trppc,.ignmask
.define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
ERANGE = 1
ESET = 2
EIDIVZ = 6
EHEAP = 17
EILLINS = 18
EODDZ = 19
ECASE = 20
.sect .text
.data1 0353
.data1 0176 ! jmp to begtext in 2 bytes. Assembler generates 3
! bytes.
.data2 -277, -277, -277, -277
.space 116
.data2 49920
begtext:
mov (.limhp),ax
mov (.reghp),ax
xor bp,bp
mov bx,sp
mov cx,(bx)
add bx,4
mov ax,cx
inc ax
shl ax,2
add ax,bx
push ax
push bx
push cx
1991-03-06 14:26:16 +00:00
call __m_a_i_n
1989-10-10 11:40:55 +00:00
push ax
call __exit
.sect .data
begdata:
hol0:
.data2 0,0
.data2 0,0
argv:
.data4 3f
envp:
.data4 0
3:
.asciz "PROGRAM"
.reghp:
.data4 endbss
.limhp:
.data4 endbss
.ignmask:
.data4 0
.trppc:
.data4 0
.sect .bss
begbss: