pea emlast
bsr _Xunlink
testen (sp)+
- blt halt
+ beq 1f
+ testen (sp)+ ! ignore result
+1:
mov #0x1B6,-(sp)
pea emlast
bsr _Xcreat
testen (sp)+
- blt halt
+ bne halt
mov (sp)+,d6 !d6 contains file descriptor
cmp.l #-1,linused-4 !test if buffer is fully used
beq 0f
mov d6,-(sp)
bsr _Xwrite
testen (sp)+
- blt halt
+ bne halt
add.l #4,sp
bra 9f
2: move.l a1,-(sp)
mov d6,-(sp)
bsr _Xwrite
testen (sp)+
- blt halt
+ bne halt
add.l #4,sp
move.l (sp)+,a1
move.l (a1),d7
move.l d7,-(sp)
mov d6,-(sp)
bsr _Xwrite
- add.l wrd+4,sp
+ testen (sp)+
+ bne halt
+ add.l 4,sp
move.l (sp)+,a1
4: move.l (a1),d1 !next print line numbers
lea mess3,a0
mov d6,-(sp)
bsr _Xwrite
testen (sp)+
- blt halt
+ bne halt
add.l #4,sp
move.l (sp)+,a1
bsr nexttab
clr.l (a1)+ !skip file name
bra 4b !only new line
9:
+ clr.l -(sp)
.sect .data
emlast: .asciz "em_last"
mess1: .asciz "no line processed yet\n"