1984-12-14 15:41:14 +00:00
|
|
|
.define .diagnos
|
1985-06-04 10:57:42 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
1984-12-14 15:41:14 +00:00
|
|
|
|
|
|
|
space = 040
|
|
|
|
del = 0177
|
|
|
|
|
1985-06-04 10:57:42 +00:00
|
|
|
.sect .text
|
1984-12-14 15:41:14 +00:00
|
|
|
.diagnos:
|
|
|
|
move.w hol0,-(sp)
|
1985-06-04 10:57:42 +00:00
|
|
|
move.l hol0+4,d2
|
1984-12-14 15:41:14 +00:00
|
|
|
beq 1f
|
|
|
|
move.l d2,a0
|
|
|
|
move.l #40,d0
|
|
|
|
3:
|
|
|
|
move.b (a0)+,d1
|
|
|
|
beq 2f
|
|
|
|
cmp.b #del,d1
|
|
|
|
bge 1f
|
|
|
|
cmp.b #space,d1
|
|
|
|
blt 1f
|
|
|
|
sub #1,d0
|
|
|
|
bgt 3b
|
1987-03-24 08:41:44 +00:00
|
|
|
clr.b (a0)
|
1984-12-14 15:41:14 +00:00
|
|
|
2:
|
|
|
|
move.l d2,-(sp)
|
|
|
|
pea fmt
|
|
|
|
jsr _printf
|
|
|
|
add #10,sp
|
|
|
|
jmp _printf
|
|
|
|
|
|
|
|
1:
|
|
|
|
move.l #unknwn,d2
|
|
|
|
bra 2b
|
|
|
|
|
1985-06-04 10:57:42 +00:00
|
|
|
.sect .data
|
1984-12-14 15:41:14 +00:00
|
|
|
fmt: .asciz "%s, line %d: "
|
|
|
|
unknwn: .asciz "unknown file"
|
|
|
|
.align 2
|