home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
sigm
/
vol179
/
trace.lbr
/
TRACE1.AQM
/
TRACE1.ASM
Wrap
Assembly Source File
|
1985-02-09
|
1KB
|
79 lines
; TRACE1 ver 1.1
; called by C program that has been converted by TRACE
; GAE 09/04/83
;
BDOS EQU 5
CPM EQU 0
PUBLIC TRACE1
TRACE1:
XTHL
PUSH D
PUSH B
PUSH PSW
MVI C,6 ; direct console i/o
MVI E,0FFH ; input
PUSH H
CALL BDOS
POP H
ORA A
JZ X0
CPI 03H ; ^C exit to CP/M
JZ CPM
CPI 12H ; ^R restart trace printout
JNZ X1
STA TR ; start trace
JMP X0
X1:
CPI 14H ; ^T stop trace printout
JNZ X2
XRA A
STA TR ; stop trace
JMP X0
X2:
CPI 13H ; ^ S freeze the program
JNZ X0
X3:
MVI C,6 ; direct console i/o
MVI E,0FFH ; input
PUSH H
CALL BDOS
POP H
CPI 11H ;^Q restart after ^S
JNZ X3
X0:
CONT:
MOV A,M
INX H
ORA A
MOV E,A
JZ FINISH
LDA TR ; if TR = 0, do not trace
ORA A
JZ CONT
PUSH H
MVI C,2 ; console output
CALL BDOS
POP H
JMP CONT
FINISH:
POP PSW
POP B
POP D
XTHL
RET
TR:
DB 1 ; zero = trace, nonzero = don't trace
END
Columbus, OH 43202
CIS 70715,1324
>CII -MT TEST.C ]
The -