do better bad-pointer testing

This commit is contained in:
ceriel 1987-07-30 09:20:59 +00:00
parent 0e9f072917
commit aa5ab51147
2 changed files with 6 additions and 1 deletions

View file

@ -74,7 +74,9 @@
#endif
#define adroff move.b (a3)+,(a5) ; move.b (a3)+,1(a5)
#define claimstack tst.b -1024(sp)
#define locptr cmp.l sp,a0 ;\
#define locptr cmp.l topstack,a0 ;\
bhi 7f ;\
cmp.l sp,a0 ;\
bcc 6f
#define heaptr cmp.l hp,a0 ;\
bhi 7f ;\

View file

@ -12,6 +12,7 @@
.define tblmax
.define ml
.define argc
.define topstack
.sect .text
.sect .rom
.sect .data
@ -22,6 +23,7 @@
!---------------------------------------------------------------------------
_m_a_i_n:
move.l sp,topstack
tst.l (sp)+
lea retarea,a5 !a5 POINTS AT RETURN AREA
move.l nd,-(sp) !nd contains endbss
@ -507,6 +509,7 @@ maxcount: .space 4
tblmax: .space 4
globmax: .space 4
topstack: .space 4
ml: .space 4
eb: .space 4 !EXPLICITELY REQUIRED eb, filb, curproc IN
filb: .space 4 !THIS ORDER