Dbg Print
Dbg Print
Macintosh · PDF
| Filename | dbg-print.pdf |
|---|---|
| Size | 0.15 MB |
| Subsection | prototypes / 1985_YACC / firmware / yaccsbug |
| Downloads | 1 |
Contents
Fi LE
Mac£bug-print.text
Modification history
6-Sep-84 NeuJ Todci;:J
8-Sep-84 Added Pr ; n t ( N )He::< roiJ t ~ nes .· mor...zed B i n2Cha:4r rot~ t i ne from i n i t
1t:-~:;ep-·B4 t·1o;~}ed t·iE i gh t t·1Err:::ir f rc:m t r¥ i t to here
.?;
14-Nov-84 Move register printing code from !nit to nere
..·----------------------------------------------------------------- AO = Ptr to PGsc:c1 i str in=~~ print
st1Jf f I e(~d ~ n:~
nn
i.-··-·
n
t·iOUEQ
t·1CU..JE. B
:i+i i
<AO)+,DO
cleGr DO
get the !ength byte
AND~B
*:£;:3F ~DO
cons trG i n
DBFiA
<RO)+_, (fl6 )+
DO_,€t0
ptfsh to buffer
¥:.eep i oop i rii;t
@1
· - · .1
#' " '
~ enid th
to . :
e~4
(fi(: )+
Display Y~i 11~1es
trGshes D1/D2
PNTZH::(
s ~ :~r¥ed d j sp i ::~1::i
TST . L
DO
BPL.S
@;iO
NEG.L
DO
#1;2D ·' ( R6 )+
PNT8!-[:(
DO
BHA.S
DO
FNT4H::(
•=·!!wC'
._:s-·-1: u
DO
PNT6HX
BSH.S
PNT2H)::
DO
PNT4HX
MOUE. t-~
BO)::B. t~~
DO .• D1
#8.;DO
PNT2H::(
Di.:DO
PNT2HX
UU ... UL
#4}00
PU THE)::
D2.:DO
PUTHE::<
ANDI .8
ORi .B
Ct·1P ~ . 8
BlE.S
test number
#:f;OF;DO
ii:$;:30_,DO
#$39.: DO
f:o
stuff ;~
ADOQ. l-J
DO_, (R6 )+
r·1ot.JE. 8
BTS
The fol lowing routines have a hex value
( ::;p )+ .• A2
R6}-(SP)
to
A1 : ..Hf1
.....
·-
sci=t}e oid f C! buffer pointer
set A6 (current.. i 0 i npu t i oc:a t i on ) tci ne1.o
(fi2)
A6_.A1
bi..J.mp Ai t..c' rre1.t1 s.}Ci i t~e
(SP )+ .:Af!
restore AC;
HTS
PEA
PMTBHX
PER
BHA . S
PEA
Pr ~ n t2He::-::
PNT2H)::
BBA.S
Pr~ nt 1He:=<
PEA
PUTHEX
BBR.S
Bin2Chc-tr
DO.B
~--------------------------------------------------------------------------------------
·'
'_,DO
#'
: .:DO
DO . (Af! )+
#:
i
t1Error
Pr i n t out four charae: ter·:=: i nd::;:;.::ed OD byte::: f r-·iJm Mte::-:: t .~
f o ! l c.!!!Jad by
' EAR'
Fix8t.!f
riFOUH
!·iFOUF;
LEA
tite::<t_, AO
DO*,AO
(RO) .• S::A6 )+
ADD
HTS
·---------------------------------------------------------------------------------------
-'
DO <inpiJt)
AO ( tr(7!Sh)
word offset from MText of text string
LEA
J·i te:=-=: t...: RO
ADD
DD_,AO
(RO)+·' (fi6 )+
(RO ) . A6 )+
t
(
HTS
...
Heg~sters
•
-- - .
t
•..
1st c:har
:... innI.!T
J
- .. ·;--
pos~t~on
SUBQ.B
ADD . H
R5.:AO
#1_,DO
DO_.AO
i;te t i n i ti a ! s t::Ar t p::ss i t i on
1:-.1dj ;_~st pc•s it ion
;:-n··e U..ie G1 t Car p=::iS t
Ct1P. L
the end p:::S i t. j or1 '?
no.= er-;d 1-u_::::.. > ~ 0 1-==-=:::.
.: (A6 )+
BBA.S
@O
stuff o spoce
cind loop
PNTCLS
CLH.L
Fl:X:BUF
Dt:
BSH.S
PNTREG
BNE.S
PNTCLS2
#4.,D6
!-Jr~ tel i ne
C;f..Jli-·i C -i
:i
! ii! ;_..i,_._t. :
PNTCLS2
CMP! .B
BNE.S
PNTCLSi
i-~r i tel i ne
MOUE.8
D7.: (A6 )+
f·10t.JE. B
BSB
PUT HEX
PNTREG
06.=DO
# : = : .= ( ACs )+
D6.~DO
LSL.L
RDD4L
*1:2 .• DO
A:3.: DO
DO.;A4
RDDQ
RTS
F ~)::BUF
ADDQ
#2;A6
t·iOt)E. B
# : = : .: ( A6 )+
pntrer;a i