ack/mach/i86/libsys/head_em.s

59 lines
809 B
ArmAsm
Raw Normal View History

1987-01-08 10:13:48 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
1985-01-07 13:57:25 +00:00
.define begtext,begdata,begbss
.define hol0,.reghp,.limhp,.trppc,.ignmask
1987-01-08 10:13:48 +00:00
.define ERANGE,ESET,EHEAP,ECASE,EILLINS
.extern _end
.extern np
1985-01-07 13:57:25 +00:00
ERANGE = 1
ESET = 2
EIDIVZ = 6
EHEAP = 17
EILLINS = 18
EODDZ = 19
ECASE = 20
1987-01-08 10:13:48 +00:00
.sect .text
1985-01-07 13:57:25 +00:00
begtext:
1987-01-08 10:13:48 +00:00
mov bx,sp
mov cx,(bx)
add bx,2
mov ax,cx
inc ax
shl ax,1
add ax,bx
push ax
push bx
push cx
mov (np),begbss
mov bx,endbss
push bx
call _brk ! allocate space for bss
pop si
xor bp,bp
1985-01-07 13:57:25 +00:00
call _m_a_i_n
1987-01-08 10:13:48 +00:00
int 0x81
.sect .data
1985-01-07 13:57:25 +00:00
begdata:
hol0:
1987-01-08 10:13:48 +00:00
.data2 0,0
.data2 0,0
1985-01-07 13:57:25 +00:00
argv:
1987-01-08 10:13:48 +00:00
.data2 3f
1985-01-07 13:57:25 +00:00
envp:
1987-01-08 10:13:48 +00:00
.data2 0
1985-01-07 13:57:25 +00:00
3:
.asciz "PROGRAM"
.reghp:
1987-01-08 10:13:48 +00:00
.data2 endbss
1985-01-07 13:57:25 +00:00
.limhp:
1987-01-08 10:13:48 +00:00
.data2 endbss
1985-01-07 13:57:25 +00:00
.ignmask:
1987-01-08 10:13:48 +00:00
.data2 0
1985-01-07 13:57:25 +00:00
.trppc:
1987-01-08 10:13:48 +00:00
.data2 0
1985-01-07 13:57:25 +00:00
1987-01-08 10:13:48 +00:00
.sect .bss
1985-01-07 13:57:25 +00:00
begbss: