ack/mach/pdp/libem/head_em.s

76 lines
1.3 KiB
ArmAsm
Raw Normal View History

1987-05-15 09:11:10 +00:00
#
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
.define LINO_AD,FILN_AD
.define ERANGE,ESET,EHEAP,EILLINS,ECASE
1990-01-22 14:57:58 +00:00
.define hol0,trppc~,trpim~,reghp~,.limhp
1987-05-15 09:11:10 +00:00
! $Header$
1984-07-19 12:51:00 +00:00
1987-05-15 09:11:10 +00:00
#define float 1
#define hardfp 1
1984-07-19 12:51:00 +00:00
1987-05-15 09:11:10 +00:00
LINO_AD = 0
FILN_AD = 4
1984-07-19 12:51:00 +00:00
1987-05-15 09:11:10 +00:00
ERANGE = 1
ESET = 2
EFOVFL = 4
EFUNFL = 5
EFDIVZ = 7
EFUND = 011
ECONV = 012
EHEAP = 021
EILLINS = 022
ECASE = 024
1984-07-19 12:51:00 +00:00
1987-05-15 09:11:10 +00:00
#ifdef float
#ifndef hardfp
! sys 060;.data2 4,fptrap / if not commented it will appear as undefined
#endif
sys 060;.data2 010,sig8
ldfps $07600
#endif
1984-07-19 12:51:00 +00:00
mov 2(sp),r0
clr -2(r0)
mov sp,r0
sub $4,sp
mov 4(sp),(sp)
tst (r0)+
mov r0,2(sp)
1:
tst (r0)+
bne 1b
cmp r0,*2(sp)
blo 1f
tst -(r0)
1:
mov r0,4(sp)
jsr pc,_m_a_i_n
1987-05-15 09:11:10 +00:00
! next two lines for as long as tail needs printf
! mov r0,-(sp)
! jsr pc,*$_exit
sys 1
1984-07-19 12:51:00 +00:00
1987-05-15 09:11:10 +00:00
.sect .data
hol0: .data2 0,0 ! line no
.data2 0,0 ! file
trppc~: .data2 0
trpim~: .data2 0
reghp~: .data2 _end
1990-01-22 14:57:58 +00:00
.limhp: .data2 _end
1984-07-19 12:51:00 +00:00
1987-05-15 09:11:10 +00:00
.sect .text
1984-07-19 12:51:00 +00:00
sig8:
1987-05-15 09:11:10 +00:00
#ifdef float
1984-07-19 12:51:00 +00:00
mov r0,-(sp)
stst r0
mov 1f(r0),-(sp)
jsr pc,trp~
1987-05-15 09:11:10 +00:00
sys 060;.data2 010,sig8
1984-07-19 12:51:00 +00:00
mov (sp)+,r0
rti
1987-05-15 09:11:10 +00:00
.sect .data
1: .data2 EILLINS, EILLINS, EFDIVZ, ECONV, EFOVFL, EFUNFL, EFUND, EILLINS
.sect .text
#endif