home *** CD-ROM | disk | FTP | other *** search
-
- * Maxon C++ Library:
- * Modul "assert"
- * Jens Gelhar 19.03.93
-
- xdef do__assert
-
- xref __Writefile,exit__i,_inttostr,_std__err
-
- do__assert: ; Stack-Parameter: char*, char*, unsigned
- lea Str1(pc),a1
- bsr.b .put
- move.l 4(a7),a1 ; Ausdruck
- bsr.b .put
- lea Str2(pc),a1
- bsr.b .put
- move.l 4+4(a7),a1 ; Dateiname
- bsr.b .put
- lea Str3(pc),a1
- bsr.b .put
- move.l 4+8(a7),d0
- lea -80(a7),a7
- move.w #10,-(a7)
- pea 2(a7)
- move.l d0,-(a7)
- jsr _inttostr
- lea 4+4+2(a7),a1
- bsr.b .put ; Zeilennummer
- lea 4+4+2+80(a7),a7
- lea Str4(pc),a1
- bsr.b .put
- move.l #990,-(a7)
- jsr exit__i
-
- .put ; String a1
- move.l a1,d2
- moveq #-1,d3
- .cnt addq.l #1,d3
- tst.b (a1)+
- bne.b .cnt
- lea _std__err,a0
- jmp __Writefile
-
- Str1: dc.b 'Assertion failed: ',0
- Str2: dc.b ', file "',0
- Str3: dc.b '", line ',0
- Str4: dc.b '.',10,0
-
- end
-