home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug002.arc
/
CEBUG.DOC
< prev
next >
Wrap
Text File
|
1979-12-31
|
72KB
|
1,825 lines
.OP
.MT 0
.HM 0
.PL 74
********************************************************************
** á á á á á á á á **
** CEBUG DOCUMENTATION FILE ROBIN WHITTLE MAY 1983 á **
** á á á á á á á á **
********************************************************************
Page 1 INTRODUCTIONá á á á
Page 2 SUMMARY OF COMMANDS á á á
Page 3 SUMMARY OF REGISTER NAMES á á
Page 4 LOADING AND RUNNING CEBUG á á
Page 6 EXPRESSIONS á á á á
Page 7 COMMANDS (In alphabetical order) á
Page 20 NOTES ON BREAKPOINTSá á á
Page 22 HANDY HINTS á á á á
Page 23 INSIDE CEBUGá á á á
è INTRODUCTION
***** INTRODUCTION *************************************************
CEBU╟ i≤ ß versioε oµ Cromemco'≤ DEBU╟ whicΦ ha≤ beeε ì
modifieΣ t∩ ruε properl∙ unde≥ CPM« DEBUG¼ anΣ thereforσ CEBU╟ ì
i≤ t∩ m∙ knowledgσ thσ mos⌠ powerfu∞ Z-8░ debugginτ prograφ ì
available. Some of its features are :-
** áDisassembly into Zilog Z-80 mnemonics
** áLine at a time assembly from Zilog Z-80 mnemonics
** áRead and write files from any memory location
** áMove blocks of data around memory
** áRead and write to I/O ports
** áSearch through memory for any combination of bytes
** áHex arithmatic including multiplication and division
** áTracing and Breakpoints can be conditional on ANYTHING
DEBU╟ wa≤ writteε b∙ Cromemc∩ t∩ ruε unde≥ it≤ operatinτ ì
systeφ - CDO╙ - whicΦ i≤ claimeΣ t∩ bσ CP═ compatable« CDO╙ wa≤ ì
developeΣ froφ CP═ 1.│ anΣ sincσ theε botΦ CDO╙ anΣ CP═ havσ haΣ ì
quitσ ß numbe≥ oµ additiona∞ systeφ call≤ addeΣ t∩ them« Needles≤ t∩ ì
sa∙ thesσ tw∩ extension≤ arσ completel∙ incompatable¼ s∩ moderε CP═ ì
program≤ whicΦ usσ sys-call≤ beyonΣ 2╖ (1┬ hex⌐ wil∞ no⌠ worδ unde≥ ì
CDO╙ anΣ Cromemc∩ program≤ whicΦ usσ sys-call≤ abovσ 12╕ (8░ hex⌐ ì
wil∞ no⌠ worδ unde≥ CPM« CDO╙ i≤ no⌠ supporteΣ fo≥ an∙ computer≤ ì
othe≥ thaε thosσ madσ b∙ Cromemco¼ anΣ iµ yo⌡ tr∙ t∩ unrave∞ thσ ì
disδ areß oµ CDO╙ s∩ yo⌡ caε makσ i⌠ worδ oε anothe≥ computer¼ theε ì
yo⌡ arσ iε fo≥ ß biτ headache« Swappinτ betweeε tw∩ operatinτ ì
system≤ send≤ yo⌡ mad¼ anΣ thσ onl∙ rea∞ wa∙ t∩ sta∙ compatablσ witΦ ì
thσ res⌠ oµ thσ worlΣ i≤ t∩ ruε CPM« Havinτ useΣ DEBU╟ therσ wa≤ n∩ ì
wa∙ ╔ wa≤ goinτ t∩ ste≡ dowε t∩ anythinτ elsσ anΣ s∩ ╔ jus⌠ haΣ t∩ ì
makσ i⌠ worδ unde≥ CPM«
Sincσ thi≤ worδ i≤ oµ valuσ t∩ man∙ other≤ ╔ havσ madσ CEBU╟ ì
anΣ thi≤ DO├ filσ availablσ t∩ al∞ interesteΣ persons« Thi≤ i≤ oµ ì
coursσ softwarσ pirac∙ bu⌠ therσ i≤ n∩ mone∙ involved¼ anΣ DEBU╟ i≤ ì
hardl∙ Cromemco'≤ breaΣ anΣ butte≥ s∩ ╔ d∩ no⌠ anticipatσ terriblσ ì
repercussions« DEBU╟ i≤ alread∙ iε widσ circulatioε bu⌠ ver∙ fe≈ ì
peoplσ kno≈ ho≈ t∩ usσ i⌠ fully« Sincσ Cromemc∩ havσ obviousl∙ pu⌠ ß ì
lo⌠ oµ effor⌠ int∩ DEBUG'≤ development¼ ╔ believσ the∙ shoulΣ makσ ß ì
CP═ versioε oµ i⌠ anΣ sel∞ i⌠ oε thσ opeε market« ╔ woulΣ mucΦ ì
rather pay $100 than spend well over 100 hours modifying DEBUG.
Iε aε idea∞ worlΣ ╔ believσ tha⌠ thσ industr∙ standarΣ ì
operatinτ systeφ woulΣ morσ closel∙ resemblσ CDO╙ thaε CPM« CDO╙ i≤ ì
mucΦ nice≥ iε man∙ way≤ - yo⌡ d∩ no⌠ havσ t∩ worr∙ abou⌠ logginτ oε ì
disk≤ - anΣ i⌠ cope≤ witΦ disδ error≤ iε ß morσ civiliseΣ fashion« ì
Cromemco'≤ documentatioε (oε whicΦ thi≤ DO├ filσ i≤ based⌐ i≤ firs⌠ ì
clas≤ anΣ thei≥ program≤ arσ generall∙ ver∙ pleasan⌠ t∩ use«
╔ havσ useΣ Cromemco'≤ codσ anΣ documentatioε witΦ ì
appreciatioε bu⌠ withou⌠ thei≥ consent« Iµ yo⌡ builΣ ß bette≥ ì
mousetra≡ thσ worlΣ wil∞ bea⌠ ß pathwa∙ t∩ you≥ door¼ bu⌠ iµ yo⌡ ì
wil∞ no⌠ sel∞ you≥ mousetra≡ theε someonσ i≤ bounΣ t∩ pincΦ it« ì
Trea⌠ thi≤ prograφ a≤ yo⌡ woulΣ an∙ othe≥ preciou≤ bu⌠ illici⌠ ì
merchandise¼ sharσ i⌠ onl∙ witΦ you≥ friends.
1
è SUMMARY OF COMMANDS
****¬ SUMMAR┘ O╞ COMMAND╙ ******************************************
áááááááCOMMAN─ áDESCRIPTION
ááááááá
ááááááá┴ Assemble into memory
áááááááB áSet and display Breakpoints
áááááááBX áDelete breakpoints
áááááááC áTrace over Calls
áááááááCN áTrace over Calls with No display
áááááááCJ áTrace over calls with Jumps
áááááááCNJ áTrace over calls with Jumps with No display
áááááááD or DM áDisplay Memory
áááááááDR áDisplay registers
áááááááE áExamine input port
áááááááF áSpecify file name
áááááááG áGo
áááááááH áHexadecimal arithmatic
áááááááL áList in assembler mnemonics
áááááááM áMove memory
áááááááO áOutput to port
áááááááQ áQuery memory
áááááááR áRead disk file
áááááááS or SM áSubstitute Memory
áááááááSr áSubstitute register (See Summary of Register Names)
áááááááT áTrace
áááááááTN áTrace with No display
áááááááTJ áTrace Jumps
áááááááTNJ áTrace Jumps with No display
áááááááV áVerify memory
áááááááW áWrite disk file
áááááááZ áZap memory
2
è SUMMARY OF REGISTER NAMES
***** SUMMARY OF REGISTER NAMES ************************************
áááááááREGISTERáDESCRIPTION
áááááááF áMain Flag register comprising of
áááááááá
áááááááá áS - Sign
áááááááá áZ - Zero
áááááááá áH - Half-carry
áááááááá áV - parity/oVerflow
áááááááá áN - subtractioN
áááááááá áC - Carry
ááááááá ┼ - Interrup⌠ enablσ flip-flo≡ i≤ als∩ showε anΣ ì
áááááááá áchanged with the F flags
áááááááF' áAlternate Flag register - as above except for (E)
áááááááA áMain 8 bit registers
áááááááB
áááááááC
áááááááD
áááááááE
áááááááH
áááááááL
ááááááá
áááááááA' áAlternate 8 bit registers
áááááááB'
áááááááC'
áááááááD'
áááááááE'
áááááááH'
áááááááL'
áááááááBC áMain 16 bit register pairs
áááááááDE
áááááááHL
áááááááBC' áAlternate 16 bit register pairs
áááááááDE'
áááááááHL'
áááááááIX áIndex register IX
áááááááIY áIndex register IY
áááááááSP áStack Pointer
áááááááPC áProgram Counter
áááááááI áInterrupt vector register
áááááááIP áInterrupt vector register as top byte
3
è LOADING AND RUNNING CEBUG
***** LOADING AND RUNNING CEBUG ************************************
*** LOADING ***
á
CEBU╟ caε bσ ruε b∙ givinτ ß commanΣ linσ t∩ CP═ iε onσ oµ ì
the following formats :-
CEBU╟ (cr⌐
Causσs CEBU╟ t∩ loaΣ iε a⌠ 010░ anΣ relocatσ itselµ t∩ thσ ì
to≡ oµ use≥ memory.
CEBU╟ ZOOM.CO═ (cr⌐
Run≤ CEBU╟ a≤ abovσ bu⌠ ZOOM.CO═ wil∞ automatical∙ bσ reaΣ ì
int∩ RA═ startinτ a⌠ 0100« Thσ filenamσ ZOOM.CO═ i≤ formatteΣ t∩ thσ ì
firs⌠ defaul⌠ Filσ Contro∞ Blocδ (FCB⌐ startinτ a⌠ 005C«
CEBU╟ ZOOM.HE╪ (cr⌐
Work≤ a≤ abovσ bu⌠ thσ filσ i≤ reaΣ a≤ aε Inte∞ He° file« ì
CEBU╟ doe≤ no⌠ linδ relocatablσ modules.
*** CONTROL CHARACTERS ***
Unde≥ CP═ 2.2¼ thσ followinτ contro∞ character≤ havσ specia∞ ì
function≤ :-
Control - C (^C) áReturn to CPM
Control - H (^H) áDelete character to the left of cursor
Control - X (^X) áDelete line
Control - U (^U) áPrint # cr lf, and accept new command line
Wheε CEBU╟ i≤ writinτ t∩ thσ consolσ (o≥ thσ printe≥ iµ yo⌡ ì
have used a ^P) then the following are active :-
Control - S (^S) Sto≡ consolσ output« ^╙ o≥ an∙ othe≥ ì
áááááááááááááááááááááááácharacte≥ wil∞ resumσ output
Spaceáááááááááááááááááááo≥ an∙ othe≥ characte≥ wil∞ sto≡ thσ curren⌠ ì
áááááááááááááááááááááááácommandáááááááááááááááááá á
*** COMMAND FORMAT ***
Command≤ arσ 1¼ ▓ o≥ │ character≤ lonτ anΣ arσ generall∙ ì
followeΣ b∙ operands« Thσ commanΣ linσ i≤ alway≤ terminateΣ b∙ ß ì
Carriagσ Returε (cr⌐ whicΦ wil∞ generall∙ no⌠ bσ showε hereafter« ì
Space≤ o≥ comma≤ caε bσ useΣ t∩ separatσ operand≤ wherσ neccesary« ì
Somσ command≤ havσ ß onσ a≤ wel∞ a≤ ß tw∩ characte≥ representation« ì
Fo≥ instancσ al∞ thσ followinτ commanΣ line≤ wil∞ displa∙ memor∙ ì
froφ 100░ t∩ 10FF:-
4
è LOADING AND RUNNING CEBUG
D1000 10FF
DM 1000,10FF
D1000S100
D 1000,S100
Notσ tha⌠ thσ las⌠ tw∩ line≤ usσ ╙ thσ swatΦ operato≥ t∩ ì
specify that the command will cover 100 bytes.
*** CURRENT PROGRAM COUNTER LOCATION ($) ***
Thσ curren⌠ addres≤ (thσ curren⌠ valuσ oµ thσ prograφ ì
counter⌐ ma∙ bσ representeΣ b∙ thσ dolla≥ sigε ($)« Thσ followinτ ì
commanΣ wil∞ begiε prograφ executioε a⌠ thσ curren⌠ valuσ oµ thσ ì
prograφ counte≥ anΣ wil∞ sto≡ a⌠ ß temporar∙ breakpoin⌠ se⌠ a⌠ ì
the current location plus 3.
G/$3
*** COMMAND STARTING ADDRESS ***
Thσ Assemblσ int∩ Memor∙ (A)¼ Displa∙ Memor∙ (D═ o≥ D)¼ Lis⌠ ì
iε Assemble≥ Mnemonic≤ (L⌐ anΣ Substitutσ Memor∙ (S═ o≥ S⌐ command≤ ì
eacΦ maintaiε thei≥ owε startinτ addres≤ t∩ usσ iµ nonσ i≤ giveε iε ì
thσ command« EacΦ addres≤ i≤ initial∙ 10░ bu⌠ wheε ß commanΣ ha≤ ì
beeε used¼ i≤ se⌠ t∩ onσ abovσ thσ las⌠ addres≤ accesseΣ iε tha⌠ ì
command.
*** @ "REGISTER" ***
Sa∙ yo⌡ arσ debugginτ ß relocatablσ modulσ - you≥ assemble≥ ì
prin⌠ listinτ give≤ yo⌡ addres≤ reference≤ relativσ t∩ thσ star⌠ oµ ì
thσ modulσ whicΦ showε a≤ 0000« Yo⌡ arσ debugginτ thσ modulσ iε it≤ ì
rea∞ lifσ startinτ locatioε oµ 3D9E¼ s∩ yo⌡ se⌠ └ t∩ 3D9┼ anΣ usσ i⌠ ì
iε al∞ relevan⌠ addres≤ specifications« Wheε └ i≤ noε zero¼ al∞ ì
addresse≤ iε CEBU╟ outpu⌠ arσ giveε directl∙ anΣ relativσ t∩ thσ └ ì
"register". To change it just type :-
@ (cr)
áCEBUG comes back with :-
@-XXXX
á
Yo⌡ caε leavσ i⌠ alonσ o≥ typσ iε ß ne≈ value« Thereafte≥ ì
yo⌡ caε Assemblσ int∩ memor∙ startinτ froφ thσ bytσ 2┬ froφ thσ ì
start of the module by typing :-
A @2B
5
è EXPRESSIONS
***** EXPRESSIONS **************************************************
*** SPECIAL SYMBOLS ***
^reg áRegister value - eg ^DE. See summary of register names
@ á@ "register"
$ áProgram counter
(expr) Contents of memory location defined by expression expr
[expr] Used to force order of evaluation within a larger expression
'xy' áValues of the ASCII characters x and y
ddd. áValue of Decimal number ddd - eg. 256. =100 hex
HHHH áHexadecimal value - eg. 0100
*** UNARY OPRATORS ***
+ áPositive number
- áNegative number
~ áLogical Not (Complement)
*** BINARY OPERATORS ***
+ áAddition
- áSubtraction
* áMultiplication
% áDivision
& áLogical AND
| áLogical OR
{Notσ tha⌠ somσ printer≤ d∩ no⌠ responΣ t∩ thσ brokeε ì
áááááááávertica∞ linσ whicΦ i≤ useΣ fo≥ thσ abovσ Logica∞ O╥ ì
ááááááááfunction« It≤ he° valuσ i≤ 7C.}
*** RELATIONAL OPERATORS ***
= áEqual to á á á á
<> áNot equal to á á
> áGreater than á á
>= áGreater than or equal to
< áLess than á á
<= áLess than or equal to á
┴ Relationa∞ Operato≥ return≤ thσ valuσ ░ iµ thσ relatioε i≤ ì
not true and FFFF if the relation is true. For example :-
[4+3=7] áevaluates as FFFF
[zzz<9]&[zzz>5] evaluates as FFFF only if zzz equals 6, 7 or 8
Aε expressioε caε bσ useΣ an∙wherσ tha⌠ ß numbe≥ i≤ needed¼ ì
iσ. fo≥ addresses¼ datß etc« Aε expressioε mus⌠ no⌠ contaiε an∙ ì
spaces. The precedence of operators is as follows :-
á1/ áSpecial Symbolsá á áHighest Precedence
á2/ áUnary Operators
á3/ áBinary Operators
á4/ áRelational operators á áLowest Precedence
6
è COMMANDS A, B
Thσ orde≥ oµ evaluatioε caε bσ altereΣ b∙ thσ usσ oµ squarσ ì
bracket≤ █ ]« Amonτ operator≤ oµ thσ samσ precedence¼ evaluatioε ì
proceeds from left to right. For example :-
10.+20.*3 áEquals 90. (decimal)
***** CEBUG COMMANDS ***********************************************
*** ***************************************
*** A - ASSEMBLE INTO MEMORY ***************************************
*** ***************************************
A áStart assembling from where you last left off
A133 áStart assembling at 133
A@40 áStart assembling at @ plus 40.
Thσ addres≤ anΣ thσ instructioε whicΦ i≤ alread∙ therσ i≤ ì
displayeΣ oε thσ console« Iµ yo⌡ d∩ no⌠ wan⌠ t∩ changσ i⌠ jus⌠ hi⌠ ì
(cr)« Iµ yo⌡ d∩ wan⌠ t∩ changσ i⌠ typσ iε thσ Z-8░ Assembl∙ mnemoniπ ì
witΦ appropriatσ operands« Iµ you≥ mnemoniπ make≤ n∩ sensσ theε ì
CEBU╟ wil∞ returε witΦ thσ samσ addres≤ s∩ yo⌡ caε tr∙ again« T∩ ge⌠ ì
ou⌠ oµ thi≤ modσ typσ « (cr)«
á á á áYour input.
-A500
0500 áLD áC,02 á áLD B,24.
0502 áJP á21B0 á áCALL @93
0505 áNOP á á áSET 6,(IX+3)
0509 áLD áC,0B á áDJNZ 500
050B áCALL á0000 á áLD A,(IX+7)
050E áAND áA,A á á.
*** ***********************
*** B - SET OR DISPLAY PERMANENT BREAKPOINTS ***********************
*** ***********************
Thσ ┬ commanΣ i≤ useΣ t∩ se⌠ permanen⌠ breakpoint≤ a≤ ì
opposeΣ t∩ thσ temporar∙ breakpoint≤ whicΦ caε bσ createΣ witΦ ß G» ì
command« ┴ permanen⌠ breakpoin⌠ wil∞ remaiε iε operatioε unti∞ i⌠ i≤ ì
explicitl∙ removeΣ b∙ ß B╪ command« I⌠ i≤ possiblσ t∩ se⌠ ß tota∞ oµ ì
1▓ breakpoint≤ usinτ usinτ thσ B¼ G¼ ╘ anΣ ├ commands« Sincσ thσ ì
tracσ commanΣ require≤ ▓ oµ thesσ yo⌡ shoulΣ no⌠ se⌠ morσ thaε 1░ ì
breakpoint≤ unles≤ yo⌡ arσ no⌠ usinτ trace« Trying to trace or se⌠ ì
breakpoint≤ wheε therσ arσ to∩ man∙ breakpoint≤ alread∙ iε usσ wil∞ ì
resul⌠ iε ß ┐ beinτ displayed« T∩ displa∙ al∞ thσ currentl∙ activσ ì
breakpoint≤ simpl∙ givσ thσ commanΣ :-
B
Notσ tha⌠ iµ yo⌡ se⌠ ß breakpoin⌠ a⌠ ß giveε addres≤ anΣ ì
theε wisΦ t∩ changσ thσ attribute≤ oµ tha⌠ breakpoin⌠ yo⌡ mus⌠ ì
removσ thσ firs⌠ breakpoin⌠ usinτ thσ B╪ commanΣ beforσ enterinτ thσ ì
7
è COMMANDS B
ne≈ breakpoin⌠ information« Iµ yo⌡ d∩ no⌠ d∩ this¼ CEBU╟ wil∞ thinδ ì
tha⌠ therσ arσ tw∩ breakpoint≤ oε thσ onσ address« Fo≥ ß ful∞ ì
discussioε oµ ho≈ thσ breakpoin⌠ anΣ tracσ function≤ arσ achieved¼ ì
seσ "Note≤ oε Breakpointsó oε pagσ 20« T∩ se⌠ permanen⌠ breakpoint≤ ì
ente≥ :-
B breakpoint-1 breakpoint-2 breakpoint-3 etc.
áA Breakpoint is specified by up to four fields :-
FIELD á áUSE
R á áReport registers flag (optional)
addr á áMemory address for breakpoint
{cond} á áCondition for breakpoint (optional)
:count á áRepeat count for breakpoint (optional)
Thσ repor⌠ register≤ flaτ i≤ useΣ t∩ displa∙ thσ register≤ ì
eacΦ timσ ß breakpoin⌠ i≤ encountereΣ durinτ execution« Thi≤ i≤ useΣ ì
in conjunction with the repeat count field.
Thσ conditioε fielΣ i≤ useΣ t∩ specif∙ ß conditiona∞ ì
breakpoint« Iµ ß conditioε i≤ specified¼ thσ breakpoin⌠ wil∞ no⌠ ì
sto≡ thσ prograφ unles≤ thσ conditioε i≤ truσ - noε zero« Thσ ì
conditioε caε bσ aε expressioε involvinτ register≤ o≥ memory« EacΦ ì
timσ thσ use≥ prograφ reache≤ thσ breakpoint¼ thσ expressioε i≤ ì
evaluated« Iµ thσ resul⌠ i≤ falsσ (zero⌐ thσ use≥ prograφ continue≤ ì
a≤ iµ thσ breakpoin⌠ diΣ no⌠ exist« Thσ tota∞ lengtΦ oµ condition≤ ì
is set by the 128 bytes that are reserved for all conditions.
Thσ repea⌠ counte≥ i≤ se⌠ wheε thσ breakpoin⌠ i≤ se⌠ anΣ i≤ ì
decrementeΣ eacΦ timσ thσ prograφ reache≤ thσ breakpoint« WitΦ ß ì
conditiona∞ breakpoint¼ thσ counte≥ i≤ decrementeΣ onl∙ wheε thσ ì
conditioε i≤ true« Wheε thσ counte≥ reache≤ zer∩ thσ prograφ i≤ ì
stopped¼ thσ breakpoin⌠ i≤ deleteΣ anΣ CEBU╟ prompt≤ fo≥ ß command« ì
T∩ rese⌠ thσ counte≥ t∩ it≤ origina∞ valuσ yo⌡ mus⌠ rese⌠ thσ ì
breakpoint«
B 106
Establishe≤ ß breakpoin⌠ a⌠ 106« Use≥ program≤ wil∞ bσ ì
diverteΣ froφ herσ t∩ CEBU╟ anΣ thσ proccessor'≤ register≤ wil∞ bσ ì
displayed.
B 106:5
áStops and displays registers on the fifth execution of 106.
B R106:5
Display≤ register≤ oε ever∙ executioε oµ 10╢ bu⌠ stop≤ oε ì
the fifth.
B 106 {^A=0}
áStops on 106 only when register A is equal to zero.
8
è COMMANDS BX, C
*** **********************************
*** BX - DELETE BREAKPOINTS **********************************
*** **********************************
BX
áDeletes all breakpoints.
BX addr-1 addr-2 etc. á
áDeletes the breakpoints specified by the addresses.
*** ***************************************
*** C - TRACE OVER CALLS ***************************************
*** ***************************************
C
C number of instructions (in hex)
C {expr}
Thσ Tracσ Ove≥ Call≤ commanΣ function≤ iε ß manne≥ simila≥ ì
t∩ thσ simplσ Tracσ command« Thσ differencσ appear≤ wheε ß CAL╠ o≥ ì
RET instruction is encountered in a multiple instruction trace.
Wheε ß Cal∞ instructioε i≤ encountereΣ durinτ thσ executioε ì
oµ ß ├ command¼ n∩ tracinτ i≤ performeΣ iε thσ calleΣ subroutine« ì
Tracinτ resume≤ wheε executioε return≤ t∩ thσ curren⌠ subroutinσ a⌠ ì
thσ locatioε whicΦ i≤ threσ location≤ beyonΣ thσ cal∞ instruction« ì
Thσ numbe≥ oµ instruction≤ counte≥ i≤ no⌠ decrememteΣ whilσ contro∞ ì
remain≤ iε thσ calleΣ subroutine« Thi≤ i≤ oµ particula≥ valuσ wheε ß ì
user program does a sys-call to CPM.
Wheε ß RE╘ instructioε i≤ encountereΣ iε ß multiplσ ì
instructioε trace¼ tracinτ wil∞ sto≡ anΣ thσ RE╘ instructioε wil∞ bσ ì
displayed« Thi≤ allow≤ yo⌡ t∩ sto≡ executioε oµ ß subroutinσ beforσ ì
contro∞ i≤ returneΣ t∩ thσ callinτ routine« A⌠ thi≤ poin⌠ yo⌡ caε ì
examinσ thσ content≤ oµ thσ register≤ anΣ modif∙ theφ beforσ thσ ì
returε instructioε i≤ executed«
Iµ ß conditiona∞ RE╘ instructioε - sucΦ a≤ RE╘ ┌ - i≤ ì
encountered¼ execu⌠ion will stop only if the condition is true.
Iµ ß conditioε i≤ specified¼ it≤ expressioε (expr⌐ wil∞ onl∙ ì
bσ evaluateΣ iε thσ curren⌠ subroutine« Thσ CAL╠ anΣ RE╘ ì
instructions are treated as above.
9
è COMMANDS CN, CJ, CNJ
*** á á á á á **************************
*** CN - TRACE OVER CALLS WITH NO DISPLAY **************************
*** á á á á á **************************
CN
CN number of instructions (in hex)
CN {expr}
Thi≤ i≤ simila≥ t∩ thσ ├ commanΣ abovσ excep⌠ tha⌠ n∩ ì
informatioε i≤ displayeΣ a≤ thσ tracσ proggresses« Wheε thσ tracσ ì
terminates, the standard register information is displayed.
**¬ á *******************************
*** CJ - TRACE OVER CALLS WITH JUMPS *******************************
*** á á á á *******************************
CJ
CJ number of instructions (in hex)
CJ {expr}
Thi≤ i≤ simila≥ t∩ thσ ├ commanΣ abovσ witΦ onσ addition« ì
Breakpoint≤ arσ establisheΣ a⌠ al∞ instruction≤ whicΦ alte≥ thσ ì
prograφ counter« Thσ CAL╠ anΣ RE╘ instruction≤ functioε a≤ the∙ d∩ ì
in the C command.
WitΦ thi≤ command¼ onl∙ JP¼ J╥ anΣ CAL╠ instruction≤ arσ ì
traceΣ anΣ onl∙ thσ executioε oµ thesσ instruction≤ cause≤ thσ ì
numbe≥ oµ instruction≤ counte≥ t∩ bσ decremented¼ o≥ thσ expressioε ì
{expr² to be evaluated.
Noticσ tha⌠ ß conditiona∞ RE╘ instructioε whosσ conditioε i≤ ì
no⌠ truσ (whicΦ mean≤ tha⌠ thσ RE╘ instructioε i≤ no⌠ executed⌐ wil∞ ì
no⌠ sto≡ prograφ executioε bu⌠ wil∞ bσ traceΣ anΣ wil∞ causσ thσ ì
numbe≥ oµ instruction≤ counte≥ t∩ bσ decrementeΣ o≥ thσ expressioε ì
to be evaluated.
Thi≤ commmanΣ wil∞ suppl∙ yo⌡ witΦ ß histor∙ oµ thσ pas⌠ ε ì
instruction≤ whicΦ altereΣ o≥ coulΣ havσ altereΣ thσ prograφ ì
counter.
*** á á á á á á **************
*** CNJ - TRACE OVER CALLS WITH JUMPS WITH NO DISPLAY **************
*** á á á á á á **************
CNJ
CNJ number of instructions (in hex)
CNJ {expr}
Thi≤ i≤ simila≥ t∩ thσ C╩ commanΣ abovσ excep⌠ tha⌠ n∩ ì
registe≥ informatioε i≤ displayeΣ unti∞ the trace terminates.
10
è COMMANDS D, DR
*** á á á ***************************************
*** D or DM - DISPLAY MEMORY ***************************************
*** á á á ***************************************
D
D ,ending address
D S swath-width
D beginning-addr
D beginning-addr ending-addr
D beginning-addr S swath-width
Thesσ al∞ displa∙ thσ content≤ oµ memor∙ iε he° anΣ ASCI╔ ì
wherσ possible« Thσ firs⌠ threσ format≤ usσ thσ enΣ oµ thσ las⌠ ì
displa∙ commanΣ fo≥ thei≥ startinτ address« Wherσ n∩ endinτ addres≤ ì
o≥ swatΦ widtΦ i≤ specified¼ thσ defaul⌠ ╕ line≤ oµ 1╢ byte≤ arσ ì
displayed.
*** á á á *****************************************
*** DR - DISPLAY REGISTERS *****************************************
*** á á á *****************************************
Wheε CEBU╟ i≤ re-entereΣ froφ ß breakpoint¼ thσ Z-80'≤ ì
registers are saved. They may be displayed by giving the command :-
DR
Thi≤ result≤ iε ß tw∩ linσ displa∙ tha⌠ wil∞ no⌠ fi⌠ neatl∙ ì
oε thi≤ 6╕ columε prin⌠ file« Thσ to≡ linσ show≤ thσ flag≤ oµ thσ ì
norma∞ registe≥ set¼ thσ interrup⌠ enablσ flag¼ thσ content≤ oµ A¼ ì
B¼ C¼ D¼ E¼ H¼ anΣ ╠ iε thσ maiε registe≥ set¼ thσ S╨ anΣ P├ anΣ thσ ì
instructioε abou⌠ t∩ bσ executed« Thσ seconΣ linσ show≤ thσ flag≤ ì
anΣ register≤ oµ thσ alternatσ registe≥ set¼ IX¼ I┘ anΣ thσ content≤ ì
oµ thσ interrup⌠ vecto≥ register« Iε addition¼ iµ thσ └ registe≥ i≤ ì
noε zero¼ thσ PC-└ i≤ showε a≤ well«
Thσ letter≤ SZHVNC(E⌐ a⌠ thσ star⌠ oµ eacΦ ro≈ represen⌠ thσ ì
flags« Wheε ß flaτ i≤ on¼ it≤ lette≥ i≤ displayed« Iµ ß flaτ i≤ off¼ ì
therσ i≤ onl∙ ß space« Iµ onl∙ thσ Zer∩ anΣ Carr∙ flag≤ arσ on¼ theε ì
" Z C " is displayed.
S Sign Flag S=▒ iµ thσ mos⌠ significan⌠ bi⌠ oµ thσ las⌠ ì
ááááááááááááááááááááááááarithmetiπ operatioε i≤ onσ - tha⌠ i≤ thσ ì
ááááááááááááááááááááááááresul⌠ wa≤ negative.
á
Z áZero Flag áZ=1 if the result was zero
H Half Carry Flag H=▒ iµ thσ las⌠ arithmetiπ operatioε ì
ááááááááááááááááááááááááproduceΣ ß carr∙ o≥ borro≈ froφ thσ leas⌠ ì
áááááááááááááááááááááááásignifican⌠ ┤ bit≤ oµ thσ operation« ╚ i≤ ì
ááááááááááááááááááááááááuseΣ b∙ DA┴ (Decima∞ Adjus⌠ Accumulator)
V Parity/O'flow Afte≥ aε arithmetiπ instructioε V=▒ iµ therσ ì
ááááááááááááááááááááááááwa≤ aε overflow« Afte≥ ß logica∞ operatioε ì
ááááááááááááááááááááááááV=▒ iµ thσ resul⌠ ha≤ eveε parity.
11
è COMMANDS E, F, G
NáááááááAdd/Sub Flag áN=1 if the last operation was subtraction.
C áCarry Flag áC=1 if the operation produced a carry.
Thσ ┼ flaτ oε thσ firs⌠ linσ onl∙ indicate≤ thσ statσ oµ thσ ì
interrup⌠ enablσ flip-flo≡ (IFF)« Iµ interrupt≤ arσ enableΣ thσ ┼ i≤ ì
displayed, otherwise a space is displayed.
*** á á á *****************************************
*** E - EXAMINE INPUT PORT *****************************************
*** á á á *****************************************
E 14
áThis reads I/O location 14 and displays the result in hex.
**¬ ******************************************
*** F - SPECIFY FILE NAME ******************************************
*** á á á ******************************************
F ZOOM.COM
F B:ZOOM.COM
FZAP.SRC
Al∞ thesσ writσ thσ filenamσ yo⌡ havσ specifieΣ int∩ thσ ì
Defaul⌠ Filσ Contro∞ Blocδ a⌠ 005C« Yo⌡ mus⌠ usσ thi≤ commanΣ beforσ ì
usinτ ╥ o≥ ╫ t∩ reaΣ o≥ writσ ß filσ unles≤ yo⌡ specifieΣ thσ ì
filenamσ iε thσ CP═ commanΣ linσ whicΦ raε CEBUG.
**¬ *********************************************************
*** G - GO *********************************************************
*** á *********************************************************
áThe Go command has the following format :-
G starting address / breakpoint-1 breakpoint-2 ... breakpoint-n
Iµ thσ startinτ addres≤ i≤ omitted¼ theε thσ content≤ oµ thσ ì
Prograφ Counte≥ arσ used« Temporar∙ breakpoint≤ caε bσ specifieΣ ì
witΦ thσ samσ field≤ a≤ witΦ thσ permanen⌠ breakpoin⌠ commanΣ B« ì
These fields are :-
R addr {expr} :n
"Ró i≤ thσ repor⌠ register≤ flag« "addró i≤ thσ addres≤ oµ ì
thσ breakpoint« "{expr}ó i≤ aε expressioε fo≥ ß conditiona∞ ì
breakpoint« ":nó specifie≤ tha⌠ thσ breakpoin⌠ wil∞ bσ activσ oε thσ ì
ntΦ execution« Oncσ thσ prograφ i≤ stoppeΣ b∙ an∙ breakpoint¼ thσ ì
temporar∙ breakpoint≤ arσ removed.
G
Starts executioε froφ curren⌠ content≤ oµ PC.
12
è COMMANDS H, L
G122
áStarts execution from 122.
G122 /124
Start≤ executioε froφ 12▓ bu⌠ put≤ ß temporar∙ breakpoin⌠ a⌠ ì
á124. á
G/$3
Start≤ executioε a⌠ curren⌠ content≤ oµ PC¼ anΣ set≤ ì
temporary breakpoint at that address plus 3.
*** á á *********************************************
*** H - HEX ARITHMATIC *********************************************
*** á á *********************************************
H expr
Evaluate≤ exp≥ (whicΦ coulΣ simpl∙ bσ ß he° number⌐ anΣ ì
displays the result in hex and decimal.á
H expr1 expr2
Evaluate≤ botΦ expression≤ anΣ display≤ expr▒ ½ expr▓ iε he° ì
and decimal, and expr1 - expr2 in hex and decimal.
H 800%4
200 512.
H123|2222
2323 8995.
H12*10.
00B4 180.
H 123 1000
1123 4387., FI23 61731.
*** á á á á ********************************
*** L - LIST IN ASSEMBLER MNEMONICS ********************************
**¬ ********************************
L
L ,ending address
L S swath-width
L beginning-addr
L beginning-addr ending-addr
L beginning-addr S swath-width
Thesσ al∞ lis⌠ thσ specifieΣ memor∙ a≤ line≤ oµ disassembleΣ ì
Z-8░ code« Thσ firs⌠ threσ format≤ usσ thσ enΣ oµ thσ las⌠ ╠ commanΣ ì
fo≥ thei≥ startinτ address« Wherσ n∩ endinτ addres≤ o≥ swatΦ widtΦ ì
i≤ specified¼ thσ defaul⌠ 1╢ line≤ arσ displayed« Iµ thσ └ registe≥ ì
i≤ noε zer∩ theε al∞ addresse≤ anΣ 1╢ bi⌠ value≤ arσ showε iε ì
absolutσ anΣ relativσ t∩ └ form« Thσ relativσ value≤ arσ followeΣ b∙ ì
ß singlσ quotσ '« Iε thσ examplσ tha⌠ follow≤, └ = 2800.
13
è COMMANDS M, O
L@800 @811
3000 á0800' áADD A,B
3001 á0801' CALL 3200 á(0A00')
3004 á0804' áCALL 3243 á(0A43')
3007 á0807' áCALL 3333 á(0B33')
300A á080A' áLD A,B
300B á080B' áOR A,C
300C á080C' JR Z,3000 á(0800')
300E á080E' áINC HL
300F á080F' áINC DE
3010 á0810' áINC BC
3011 á0811' áLD A,H
*** á á ************************************************
**¬ ═ - MOV┼ MEMOR┘ ************************************************
*** á á ************************************************
M source-addr source-end-addr destination-addr
M source-addr S swath-width destination-addr
Thσ firs⌠ forma⌠ move≤ thσ content≤ oµ memor∙ beginninτ witΦ ì
thσ source-add≥ anΣ endinτ witΦ thσ source-end-add≥ t∩ thσ ì
destination-addr« Thσ seconΣ forma⌠ use≤ thσ swatΦ widtΦ t∩ ì
determine the length of the move.
Thσ movσ i≤ verifieΣ t∩ ensurσ tha⌠ al∞ byte≤ werσ moveΣ ì
correctly« CEBU╟ move≤ thσ lowes⌠ bytσ firs⌠ s∩ iµ you≥ destinatioε ì
overlap≤ you≥ sourcσ anΣ start≤ abovσ thσ sourcσ star⌠ theε par⌠ oµ ì
you≥ sourcσ wil∞ bσ overwritteε beforσ i⌠ i≤ moved« T∩ avoiΣ thi≤ ì
yo⌡ coulΣ movσ you≥ datß t∩ anothe≥ areß oµ memor∙ beforσ movinτ i⌠ ì
t∩ thσ fina∞ destination« Alternativel∙ yo⌡ coulΣ writσ thσ datß ou⌠ ì
t∩ disδ anΣ reaΣ i⌠ iε a⌠ thσ desireΣ location« Iµ you≥ destinatioε ì
overlap≤ you≥ sourcσ bu⌠ i≤ lowe≥ thaε it¼ theε thσ datß wil∞ bσ ì
moveΣ correctl∙ bu⌠ lot≤ oµ error≤ wil∞ bσ reported« Thσ erro≥ ì
reporting can be stopped by typing any character.
*** á á á ****************************************
*** O - OUTPUT DATA TO PORT ****************************************
*** á á á ****************************************
O data-byte port-address
áThis command writes a byte to an I/O location.
O 07 31
áThis writes 07 to I/O location 31.
14
è COMMANDS Q, R
*** á á ***********************************************
*** Q - QUERY MEMORY ***********************************************
*** á á ***********************************************
Q beginning-address ending-address string-of-bytes
Q beginning-address S swath-width string-of-bytes
Thi≤ commanΣ searche≤ througΦ thσ specifieΣ memor∙ fo≥ ß ì
giveε patterε oµ bytes« Oε eacΦ occurrencσ oµ thσ strinτ beinτ ì
matched¼ 1╢ byte≤ startinτ a⌠ thσ firs⌠ matcΦ bytσ wil∞ bσ displayeΣ ì
a≤ iε thσ D═ command« Thσ string-of-byte≤ follow≤ thσ samσ forma⌠ a≤ ì
thσ S═ command« Thi≤ make≤ ╤ aε invaluablσ commanΣ fo≥ figurinτ ou⌠ ì
wha⌠ unknowε program≤ do.
Q 100 S1000 CD 05 00
á
áThis is a good way of looking for sys-calls in a program.
Q 100 2000 'KEYWORD'
áSearches for the ASCII string of bytes for KEYWORD.
*** á á *********************************************
*** R - READ DISK FILE *********************************************
*** á á *********************************************
Oncσ yo⌡ havσ useΣ thσ F commanΣ t∩ pu⌠ ß properl∙ formatteΣ ì
filenamσ iε thσ FC┬ a⌠ 005C¼ ╥ wil∞ reaΣ tha⌠ filσ int∩ memory« Al∞ ì
file≤ arσ reaΣ iε directl∙ excep⌠ fo≥ file≤ witΦ ß .HE╪ extensioε ì
whicΦ arσ interpreteΣ a≤ Inte∞ He° forma⌠ files.
R á
áSimply reads the file into memory with no displacement.
R displacement
Read≤ thσ filσ int∩ memor∙ witΦ ß displacement« Iµ aε Inte∞ ì
He° filσ i≤ reaΣ theε thσ filσ i≤ reaΣ int∩ thσ addres≤ specifieΣ iε ì
thσ filσ plu≤ thσ displacement« An∙ othe≥ filσ i≤ reaΣ directl∙ int∩ ì
memor∙ startinτ a⌠ 10░ plu≤ thσ displacement« Thi≤ i≤ quitσ usefu∞ ì
iµ yo⌡ havσ assembleΣ ß prograφ tha⌠ wil∞ residσ abovσ CPM¼ becausσ ì
man∙ othe≥ loaΣ program≤ wil∞ refusσ t∩ pu⌠ i⌠ there« Yo⌡ caε loaΣ ì
i⌠ int∩ use≥ memor∙ usinτ ß displacemen⌠ anΣ theε movσ i⌠ u≡ t∩ ì
where it belongs.
Wheε thσ ╥ commanΣ i≤ executed¼ CEBU╟ display≤ ß questioε ì
marδ iµ therσ i≤ aε erro≥ - filσ no⌠ found¼ checksuφ erro≥ o≥ ì
attemptinτ t∩ reaΣ int∩ memor∙ abovσ thσ highes⌠ availablσ address« ì
If there are no errors the following message is displayed :-
15
è COMMANDS S
NEXT = xxxx
NEXTM = yyyy
Wherσ xxx° i≤ onσ morσ thaε thσ highes⌠ addres≤ loadeΣ b∙ ì
al∞ ╥ command≤ s∩ far« yyy∙ i≤ onσ morσ thaε thσ highes⌠ addres≤ ì
loaded by this R command.
*** á á á á************************************
*** S or SM - SUBSTITUTE MEMORY ************************************
*** á á á á************************************
S
SM
áStart substituting from where you last left off.
S starting-address
SM starting-address
Star⌠ substitutinτ froφ thσ addres≤ specified¼ whicΦ ma∙ bσ ì
a hex number or an expression.
CEBU╟ display≤ thσ addres≤ (anΣ thσ relativσ addres≤ iµ └ i≤ ì
noε zero)¼ anΣ thσ curren⌠ content≤ oµ thσ address« Yo⌡ ma∙ no≈ ì
enter one of the following :-
3D (cr)
┴ datß bytσ whicΦ i≤ writteε int∩ thσ location« CEBU╟ ì
returns with the next address.
'HELP! I am trapped inside this computer' (cr)
áAn ASCII string enclosed by single quotes.
'I am on one line' 0D 0A 'I am on the line below' 0D 0A (cr)
┴ mixturσ oµ ASCI╔ anΣ hex« Notσ tha⌠ yo⌡ canno⌠ enclosσ ì
unprintablσ ASCI╔ iε thσ quotes¼ s∩ yo⌡ mus⌠ specif∙ Carriagσ ì
Return≤ anΣ Linσ Feed≤ iε hex.
- (cr)
┴ minu≤ sigε doe≤ no⌠ storσ ß bytσ bu⌠ move≤ yo⌡ bacδ b∙ onσ ì
addres≤ location.
(cr)
┴ Carriagσ Returε onl∙ move≤ yo⌡ ont∩ thσ nex⌠ addres≤ ì
without changing the contents of the current address.
. (cr)
Get≤ yo⌡ ou⌠ oµ thσ Substitutσ Memor∙ modσ anΣ bacδ t∩ thσ ì
normal prompt.
16
è COMMANDS Sr, T
*** á á á **************************************
**¬ S≥ - SUBSTITUT┼ REGISTER╙ **************************************
*** á á á **************************************
Thi≤ allow≤ yo⌡ t∩ changσ thσ content≤ oµ thσ buffer≤ whicΦ ì
storσ thσ Z-8░ registe≥ content≤ wheε you≥ prograφ enter≤ CEBU╟ froφ ì
ß breakpoint« Thi≤ allow≤ yo⌡ t∩ se⌠ u≡ thσ Z-8░ a≤ yo⌡ wisΦ wheε ì
yo⌡ re-ente≥ you≥ program« Thσ lette≥ ≥ stand≤ fo≥ thσ registe≥ yo⌡ ì
wisΦ t∩ change« Thσ Summar∙ oµ Registe≥ Name≤ tell≤ yo⌡ whicΦ ì
letter(s) to use for a particular register.
Wheε yo⌡ wisΦ t∩ substitutσ thσ flag≤ o≥ alternatσ flag≤ ì
ente≥ thσ commanΣ S╞ or SF'« CEBU╟ wil∞ theε displa∙ thσ flag≤ tha⌠ ì
arσ se⌠ anΣ wai⌠ fo≥ yo⌡ t∩ typσ iε thσ flag≤ yo⌡ woulΣ likσ t∩ bσ ì
set« Iµ ß flaτ i≤ no⌠ entered¼ i⌠ i≤ reset« Iε thσ followinτ ì
example≤ thσ programmer'≤ inpu⌠ i≤ iε lowe≥ case.
sf (cr)
SZH C zc (cr)
Fo≥ al∞ othe≥ registers¼ CEBU╟ type≤ ou⌠ thσ registe≥ namσ ì
anΣ content≤ anΣ yo⌡ ente≥ thσ ne≈ content≤ iε he° o≥ a≤ aε ì
expression.
sa (cr)
A=98 41 (cr)
sde (cr)
DE=0152 f003 (cr)
*** á ****************************************************** á
*** T - TRACE ******************************************************
*** á ******************************************************
T
T number of instructions (in hex)
T {expr}
Thσ firs⌠ forma⌠ trace≤ thσ prograφ througΦ onσ instruction« ì
Thσ seconΣ trace≤ througΦ thσ specifieΣ numbe≥ oµ instructions« Thσ ì
thirΣ forma⌠ trace≤ unti∞ thσ expressioε i≤ truσ (no⌠ equa∞ t∩ ì
zero)« Afte≥ ever∙ instructioε i≤ traced¼ thσ register≤ arσ ì
displayed« Tracinτ wil∞ sto≡ iµ yo⌡ pres≤ an∙ key« Tracinτ wil∞ als∩ ì
sto≡ iµ ß permanen⌠ breakpoin⌠ i≤ encountereΣ anΣ it≤ condition≤ ì
satisfied.
T {^B<3}
áThis commamd will trace until the B register goes below 3.
17
è COMMANDS TN, TJ, TNJ
*** á á á *************************************
*** TN - TRACE WITH NO DISPLAY *************************************
*** á á á *************************************
TN
TN number of instructions (in hex)
TN {expr}
Thi≤ commanΣ i≤ simila≥ t∩ Tracσ abovσ excep⌠ tha⌠ n∩ ì
informatioε i≤ displayeΣ a≤ thσ tracσ progresses« StandarΣ registe≥ ì
informatioε i≤ onl∙ displayeΣ wheε thσ tracσ terminates«
WitΦ ß ┤ Mh· Z-8░ witΦ n∩ wai⌠ states¼ i⌠ take≤ abou⌠ 1┤ ì
second≤ t∩ tracσ 100░ he° instructions¼ o≥ jus⌠ ove≥ 10░ he° pe≥ ì
second« WitΦ 1░ breakpoint≤ t∩ removσ anΣ replacσ ever∙ tracσ cycle¼ ì
i⌠ slow≤ t∩ abou⌠ A░ he° (10░ decimal⌐ instruction≤ pe≥ second« Iµ ì
therσ i≤ ß largσ expressioε t∩ evaluatσ theε i⌠ get≤ mucΦ slowe≥ ì
thaε this.
*** á á ***********************************************
*** TJ - TRACE JUMPS ***********************************************
*** á á ***********************************************
TJ
TJ number of instructions (in hex)
TJ {expr}
Thi≤ commanΣ i≤ simila≥ t∩ thσ Tracσ commanΣ excep⌠ tha⌠ ì
breakpoint≤ arσ onl∙ placeΣ iε thσ use≥ prograφ beforσ instruction≤ ì
whicΦ alte≥ thσ prograφ counte≥ (JP¼ JR¼ CAL╠ anΣ RE╘ instructions)« ì
Thσ register≤ wil∞ bσ displayed¼ thσ numbe≥ oµ instruction≤ counte≥ ì
decrememteΣ anΣ thσ expressioε evaluateΣ onl∙ wheε onσ oµ thesσ ì
instructions is encountered.
TJ
Wil∞ causσ thσ prograφ t∩ bσ executeΣ unti∞ thσ nex⌠ P├ ì
alterinτ instructioε i≤ reached« Thσ register≤ wil∞ theε bσ ì
displayed and CEBUG will prompt you for a command.
*** á á á á ******************************
*** TNJ - TRACE JUMPS WITH NO DISPLAY ******************************
*** á á á á ******************************
TNJ
TNJ number of instructions (in hex)
TNJ {expr}
Thi≤ i≤ simila≥ t∩ thσ T╩ commanΣ abovσ excep⌠ tha⌠ n∩ ì
informatioε i≤ displayeΣ a≤ thσ tracσ progresses« Wheε thσ tracσ ì
terminates, the standard register information is displayed.
18
è COMMANDS V, W, Z
*** á á **********************************************
*** V - VERIFY MEMORY **********************************************
*** á á **********************************************
V source-addr source-end destination-addr
V source-addr S swath-width destination-addr
Thi≤ commanΣ read≤ eacΦ bytσ oµ thσ sourcσ blocδ oµ memor∙ ì
anΣ compare≤ i⌠ witΦ thσ correspondinτ bytσ oµ thσ destinatioε ì
block« Iµ ß discrepanc∙ i≤ found¼ i⌠ i≤ displayeΣ iε thσ followinτ ì
order║ sourcσ address¼ sourcσ contents¼ destinatioε contents¼ ì
destinatioε address« Iε thσ examplσ tha⌠ follows¼ location≤ 000│ anΣ ì
1003 contain different data. The same is true of 0008 and 1008.
V 0 S30 1000
0003 32 12 1003
0008 7A 5A 1008
*** á á á********************************************
*** W - WRITE DISK FILE ********************************************
*** á á á********************************************
Thσ ╫ commanΣ i≤ useΣ t∩ writσ ou⌠ part≤ oµ memor∙ t∩ ß disδ ì
file« Thσ filσ namσ must havσ previousl∙ beeε specifieΣ witΦ thσ ╞ ì
commanΣ o≥ havσ beeε followinτ CEBU╟ oε thσ commanΣ linσ yo⌡ gavσ t∩ ì
CPM. There are four possible command formats :-
W
Start≤ a⌠ 10░ anΣ end≤ a⌠ thσ addres≤ showε iε thσ NEXT╜ ì
line which was displayed after the last R command.
W beginning-addr ending-addr
W beginning-addr S swath-width
Beginninτ anΣ enΣ addresse≤ arσ specifieΣ directl∙ o≥ usinτ ì
the S swath operator.
W ,ending-addr
Thσ beginninτ addres≤ i≤ 10░ anΣ thσ enΣ i≤ specifieΣ ì
directly.
**¬ **************************************************
*** Z -ZAP MEMORY **************************************************
*** á á **************************************************
Z beginning-addr ending-addr string-of-bytes
Z beginning-addr S swath-width string-of-bytes
Thσ specifieΣ portioε oµ memor∙ i≤ initialiseΣ witΦ thσ ì
strinτ oµ byte≤ repeateΣ ove≥ anΣ over« Thσ forma⌠ fo≥ thσ strinτ oµ ì
bytes is the same as with the S substitute memory command.
19
è NOTES ON BREAKPOINTS
***** NOTES ON BREAKPOINTS *****************************************
*** HOW BREAKPOINTS AND TRACES WORK ***
Wheε CEBU╟ set≤ ß breakpoin⌠ a⌠ ß particula≥ address¼ sa∙ ì
10╡ iε thσ followinτ example¼ i⌠ change≤ thσ bytσ a⌠ tha⌠ locatioε ì
t∩ F╖ whicΦ i≤ onσ oµ thσ RS╘ restar⌠ instructions« F╖ i≤ ß singlσ ì
bytσ instructioε whicΦ tell≤ thσ Z-8░ t∩ cal∞ t∩ subroutinσ a⌠ 0030« ì
Hencσ thσ namσ oµ thi≤ instructioε - RS╘ 30« CEBU╟ als∩ write≤ int∩ ì
location≤ 003░ t∩ 003▓ ß jum≡ instructioε bacδ t∩ ß specia∞ entr∙ ì
poin⌠ iε CEBUG« Thσ resul⌠ i≤ tha⌠ wheε thσ Z-8░ run≤ thσ ì
instructioε a⌠ 105¼ i⌠ doe≤ no⌠ executσ thσ instructioε yo⌡ pu⌠ ì
there¼ bu⌠ pushe≤ ß returε addres≤ (10╢ iε thi≤ case⌐ oε thσ stack¼ ì
jump≤ t∩ 003░ anΣ froφ therσ jump≤ bacδ int∩ CEBUG« Thσ content≤ oµ ì
thσ Z-80'≤ register≤ arσ saveΣ anΣ CEBUG¼ pop≤ thσ stacδ t∩ finΣ ou⌠ ì
wherσ thσ F╖ was.
CEBU╟ maintain≤ ß lis⌠ oµ thσ breakpoint≤ i⌠ ha≤ set¼ anΣ ì
thσ bytσ tha⌠ reall∙ belong≤ iε eacΦ location¼ anΣ i⌠ restore≤ thσ ì
breakpoin⌠ location≤ t∩ thei≥ prope≥ values« Therσ arσ fou≥ possiblσ ì
reason≤ wh∙ thσ proccesso≥ raε aε F╖ (RS╘ 30⌐ instructioε :-
1» Thσ F╖ wa≤ a⌠ aε addres≤ wherσ ß permanen⌠ breakpoin⌠ wa≤ ì
ááááááááset« Iµ thσ breakpoin⌠ a⌠ thi≤ addres≤ i≤ unconditiona∞ o≥ ì
ááááááááiµ CEBU╟ figure≤ ou⌠ tha⌠ it≤ condition≤ arσ satisfieΣ theε ì
ááááááááCEBU╟ display≤ thσ registe≥ content≤ anΣ prompt≤ yo⌡ fo≥ ß ì
áááááááácommand« Iµ thσ condition≤ (number-of-instruction≤ o≥ ì
áááááááá{expr}⌐ arσ no⌠ satisfieΣ theε CEBU╟ allow≤ thσ prograφ t∩ ì
áááááááárun as if the breakpoint had not been encountered.
2/ááááááThσ F╖ wa≤ a⌠ aε addres≤ wherσ ß temporar∙ breakpoin⌠ wa≤ ì
ááááááááset« Thσ procces≤ i≤ a≤ abovσ bu⌠ iµ CEBU╟ decide≤ no⌠ t∩ ì
áááááááácontinuσ iε thσ prograφ anΣ thereforσ t∩ promp⌠ yo⌡ fo≥ ß ì
áááááááácommand¼ theε al∞ temporar∙ breakpoint≤ (includinτ thi≤ one⌐ ì
ááááááááare removed from the list.
á
3» Thσ F╖ wa≤ pu⌠ a⌠ thi≤ addres≤ a≤ par⌠ oµ ß Tracσ operation« ì
ááááááááFo≥ instancσ iµ CEBU╟ haΣ jus⌠ traceΣ thσ L─ HL,880░ ì
ááááááááinstructioε a⌠ 0102¼ i⌠ woulΣ havσ placeΣ ß F╖ a⌠ 010╡ s∩ ì
áááááááátha⌠ a≤ sooε a≤ 010▓ haΣ beeε executed¼ thσ Z-8░ woulΣ jum≡ ì
áááááááábacδ int∩ CEBUG« A≤ abovσ i⌠ restore≤ al∞ breakpoin⌠ ì
áááááááálocation≤ t∩ therσ prope≥ values¼ anΣ check≤ an∙ condition≤ ì
ááááááááor counts to see whether to :-
ááááááááa/ áTrace one more instruction.
ááááááááb» Displa∙ register≤ anΣ tracσ onσ morσ instruction.
áááááááác/ áDisplay registers and prompt for a command.
áááááááád» Se⌠ ß breakpoin⌠ somewherσ elsσ anΣ returε t∩ thσ ì
áááááááá program« Thi≤ coulΣ bσ thσ casσ iµ onσ oµ thσ Tracσ ì
ááááááááááááááááove≥ Call≤ o≥ Jump≤ commands has been given.
20
è NOTES ON BREAKPOINTS
4/ááááááThσ addres≤ tha⌠ thσ F╖ wa≤ a⌠ diΣ no⌠ appea≥ iε thσ granΣ ì
áááááááális⌠ oµ breakpoints« Thi≤ mean≤ tha⌠ thσ Z-8░ mos⌠ likel∙ ì
ááááááááraε thi≤ F╖ b∙ accident« CEBU╟ display≤ thσ register≤ ì
ááááááááshowinτ thσ locatioε oµ thσ F╖ RS╘ 3░ instructioε anΣ ì
ááááááááprompts you for a command.
ADDR áDATA MNEMONIC
0100 *á3E áLD áA, 32
0101 á22
0102 *á21 áLD áHL, 8800
0103 á00
0104 á88
0105 *á77 áLD á(HL), A <<<< F7 written in here.
0106 *á23 áINC áHL
0107 *á11 áLD áDE, 8923
0108 á23
0109 á89
* A star means this is the first byte of an instruction.
Iµ therσ arσ place≤ iε you≥ prograφ whicΦ thσ Z-8░ shoulΣ ì
no⌠ normall∙ ge⌠ to¼ theε yo⌡ coulΣ writσ F7≤ a⌠ thesσ location≤ s∩ ì
tha⌠ contro∞ wil∞ returε t∩ yo⌡ immediatel∙ onσ oµ thesσ ì
instruction≤ i≤ ruε a≤ iε 4» above« Sincσ CEBU╟ doe≤ no⌠ writσ thσ ì
jum≡ instructioε int∩ 003░ unti∞ yo⌡ havσ useΣ thσ breakpoin⌠ o≥ ì
tracσ functions¼ bσ surσ t∩ d∩ a⌠ leas⌠ onσ tracσ o≥ se⌠ onσ ì
breakpoin⌠ beforσ relyinτ oε thi≤ facility.
Wheε CEBU╟ return≤ contro∞ t∩ thσ prograφ unde≥ test¼ ì
i⌠ set≤ al∞ thσ permanen⌠ anΣ temporar∙ breakpoints¼ savinτ thσ ì
prope≥ content≤ oµ thosσ byte≤ somewherσ iε CEBUG« I⌠ theε load≤ u≡ ì
thσ Z-80'≤ register≤ froφ wherσ the∙ werσ storeΣ anΣ jump≤ bacδ t∩ ì
thσ appropriatσ locatioε iε thσ program« Iε somσ case≤ i⌠ mus⌠ bσ ì
morσ complicateΣ thaε this« Iµ CEBU╟ i≤ tracing¼ i⌠ mus⌠ figurσ ou⌠ ì
wherσ thσ Z-8░ i≤ goinτ t∩ reaΣ its nex⌠ instructioε from afte≥ thσ ì
curren⌠ one¼ becausσ i⌠ ha≤ t∩ pu⌠ ß breakpoin⌠ there« Iε mos⌠ case≤ ì
thi≤ i≤ simpl∙ thσ nex⌠ instructioε 1¼ 2¼ │ o≥ ┤ byte≤ afte≥ thσ ì
curren⌠ one« Iε othe≥ case≤ sucΦ a≤ conditiona∞ call≤ anΣ jum≡ t∩ ì
(HL)¼ (IX⌐ o≥ (IY)¼ CEBU╟ mus⌠ looδ a⌠ thσ curren⌠ instruction¼ thσ ì
flag≤ anΣ thσ content≤ oµ register≤ t∩ correctl∙ decidσ wherσ t∩ ì
put the next breakpoint.
Aε eveε morσ complicateΣ situatioε exist≤ wherσ ß permanen⌠ ì
breakpoin⌠ ha≤ jus⌠ beeε encountereΣ anΣ CEBU╟ i≤ returninτ t∩ thσ ì
instructioε whicΦ belong≤ a⌠ tha⌠ breakpoint« Iε thi≤ casσ i⌠ mus⌠ ì
no⌠ pu⌠ F╖ iε thi≤ location¼ bu⌠ mus⌠ leavσ thσ origina∞ bytσ therσ ì
anΣ se⌠ ß temporar∙ breakpoin⌠ a⌠ thσ locatioε whicΦ thσ Z-8░ wil∞ ì
reaΣ it≤ nex⌠ instructioε froφ afte≥ thσ curren⌠ instruction« Iε thσ ì
abovσ examplσ thi≤ woulΣ entai∞ putinτ ß F╖ a⌠ 010╢ anΣ leavinτ thσ ì
7╖ a⌠ 0105« Thi≤ breakpoin⌠ i≤ neccesar∙ s∩ tha⌠ a≤ sooε a≤ thσ 7╖ ì
instructioε a⌠ 010╡ ha≤ beeε exexuted¼ contro∞ wil∞ bσ returneΣ t∩ ì
CEBU╟ s∩ i⌠ caε pu⌠ aε F╖ a⌠ 010╡ agaiε s∩ tha⌠ thσ permanen⌠ ì
breakpoin⌠ wil∞ operate.
21
è HANDY HINTS
*** THE LIMITATIONS OF BREAKPOINTS AND TRACES ***
Onσ obviou≤ limitatioε i≤ tha⌠ i⌠ i≤ impossiblσ t∩ tracσ o≥ ì
se⌠ breakpoint≤ iε ReaΣ Onl∙ Memory« Selµ modifyinτ codσ woulΣ ì
almos⌠ certainl∙ causσ headache≤ a≤ well« Yo⌡ mus⌠ bσ surσ tha⌠ thσ ì
locatioε yo⌡ arσ specifyinτ a≤ ß breakpoin⌠ i≤ thσ firs⌠ bytσ oµ aε ì
instructioε - othe≥ wisσ thσ Z-8░ wil∞ no⌠ interpre⌠ thσ F╖ a≤ ì
desired« ╔ havσ no⌠ ye⌠ trieΣ usinτ CEBU╟ oε ß grou≡ oµ program≤ ì
driveε b∙ ß numbe≥ oµ interrupts¼ bu⌠ ╔ imaginσ i⌠ woulΣ ge⌠ prett∙ ì
dicey« M∙ ultimatσ weapoε fo≥ dealinτ witΦ sucΦ ß situatioε i≤ m∙ ì
homσ bre≈ compute≥ (C┴ 1978⌐ whicΦ ha≤ ß he° displa∙ oµ thσ addres≤ ì
anΣ datß busses¼ anΣ thσ abilit∙ t∩ usσ thσ Z-8░ wai⌠ linσ t∩ ì
single-cyclσ througΦ instruction≤ memor∙ acces≤ b∙ memor∙ access« ì
Thi≤ compute≥ ha≤ ß 1╢ bi⌠ latcΦ anΣ comparato≥ s∩ wheneve≥ ß ì
particula≥ memor∙ locatioε i≤ reaΣ o≥ writteε into¼ thσ Z-8░ wait≤ ì
anΣ yo⌡ caε singlσ cyclσ froφ there« Hopefull∙ thi≤ frontpane∞ iε ì
combinatioε witΦ CEBU╟ anΣ ß fas⌠ printe≥ wil∞ bσ aε invinciblσ ì
combinatioε iε thσ wa≥ agains⌠ gremlins.
Sincσ thσ tracσ procces≤ i≤ rathe≥ slo≈ compareΣ t∩ norma∞ ì
executioε speeΣ (seσ ╘ - TRAC┼ command)¼ yo⌡ wil∞ no⌠ bσ ablσ t∩ ì
dea∞ easil∙ witΦ program≤ tha⌠ havσ t∩ kee≡ u≡ witΦ thσ rea∞ world« ì
Thi≤ i≤ wherσ thσ Tracσ ove≥ Call≤ come≤ iε handy« Anothe≥ probleφ ì
exist≤ wherσ thσ prograφ unde≥ tes⌠ call≤ CP═ througΦ 000╡ t∩ d∩ ß ì
sys-call« Yo⌡ canno⌠ reall∙ tracσ you≥ wa∙ int∩ thσ gizzard≤ oµ CP═ ì
becausσ CEBU╟ i≤ usinτ thσ samσ pathwa∙ t∩ communicatσ witΦ you« ì
AlthougΦ i⌠ i≤ possiblσ t∩ tracσ througΦ ß piecσ oµ codσ anΣ usσ i⌠ ì
a≤ well¼ yo⌡ ruε int∩ problem≤ witΦ thσ CEBU╟ acces≤ overwritinτ ì
datß storeΣ iε RA═ tha⌠ wa≤ pu⌠ therσ a≤ par⌠ oµ thσ prograφ unde≥ ì
test« Iµ yo⌡ wan⌠ t∩ tracσ througΦ CPM¼ m∙ advicσ i≤ t∩ generatσ ß ì
32╦ CP═ tha⌠ yo⌡ caε loaΣ unde≥ CEBU╟ anΣ onl∙ tracσ througΦ thσ ì
part≤ tha⌠ yo⌡ neeΣ to« Yo⌡ shoulΣ takσ thσ samσ approacΦ iµ yo⌡ ì
wan⌠ t∩ tracσ througΦ parts of CEBUG.
***** HANDY HINTS **************************************************
Successfu∞ compute≥ hackinτ require≤ aε intimatσ knowledgσ ì
oµ ever∙ componen⌠ yo⌡ arσ dealinτ with¼ o≥ aε inquisitivσ desirσ t∩ ì
aquirσ tha⌠ knowledge« Yo⌡ shoulΣ kno≈ enougΦ abou⌠ TT╠ anΣ thσ ì
largσ MO╙ device≤ iε you≥ systeφ no⌠ t∩ bσ scareΣ oµ them¼ anΣ yo⌡ ì
neeΣ thorougΦ origina∞ datß sheet≤ iµ yo⌡ arσ talkinτ directl∙ t∩ ì
ß PIO¼ CTC¼ SI╧ o≥ Flopp∙ Disδ Controller« Yo⌡ definitel∙ neeΣ t∩ bσ ì
conversan⌠ witΦ thσ inne≥ working≤ oµ CPM¼ anΣ thσ Digita∞ ResearcΦ ì
CP═ documentatioε i≤ no⌠ reall∙ mucΦ hel≡ t∩ thσ uninitiated« ╔ havσ ì
founΣ thσ "Osbournσ CP/═ Use≥ Guideó t∩ bσ ver∙ usefu∞ althougΦ thσ ì
Digita∞ ReseacΦ blurb≤ arσ sometime≤ handy«
Mos⌠ importantl∙ yo⌡ neeΣ t∩ havσ ß clea≥ understandinτ oµ ì
wha⌠ thσ Z-8░ i≤ al∞ about« Therσ arσ variou≤ unofficia∞ book≤ oε Z-ì
8░ programminτ whicΦ ╔ havσ no⌠ used¼ bu⌠ arσ n∩ doub⌠ oµ somσ ì
value« Thσ Ziloτ "Z-8░ Assembl∙ Languagσ Programminτ Manualó ha≤ thσ ì
officia∞ Ziloτ Mnemonic≤ whicΦ yo⌡ neeΣ t∩ kno≈ fo≥ assembl∙ ì
programming¼ anΣ ß detaileΣ explanatioε oµ exactl∙ wha⌠ eacΦ ì
instructioε does« Howeve≥ thσ booδ tha⌠ ╔ caε mos⌠ highl∙ recommenΣ ì
22
è INSIDE CEBUG
i≤ thσ Ziloτ (o≥ Mostek⌐ 7▓ pagσ "Z-8░ Technica∞ Manual"« Thi≤ i≤ ì
thσ Z-8░ Biblσ anΣ yo⌡ can'⌠ g∩ t∩ heaveε withou⌠ ití I⌠ give≤ yo⌡ ß ì
completσ descriptioε oµ wha⌠ thσ Z-8░ i≤ a≤ ß piecσ oµ electronic≤ - ì
electrica∞ characteristic≤ anΣ timinτ diagram≤ dowε t∩ thσ ten≤ oµ ì
nanoseconds« Oµ greates⌠ importancσ i≤ thσ wa∙ thσ instructioε se⌠ ì
i≤ presenteΣ - eacΦ oµ thσ 1┤ page≤ deal≤ witΦ ß differen⌠ grou≡ oµ ì
instruction≤ whicΦ arσ showε a≤ ß griΣ oµ he° numbers« Findinτ thσ ì
instructioε yo⌡ want¼ o≥ findinτ ou⌠ whethe≥ i⌠ exist≤ o≥ no⌠ i≤ ì
ver∙ easy« Fo≥ instancσ al∞ thσ ╕ bi⌠ load≤ arσ iε onσ table¼ anΣ ì
yo⌡ caε instantl∙ seσ tha⌠ yo⌡ caε writσ thσ content≤ oµ registe≥ ─ ì
int∩ (HL⌐ bu⌠ no⌠ int∩ (BC)« Thσ "Z-8░ Technica∞ Manualó give≤ yo⌡ ì
aε intimatσ anΣ graphiπ understandinτ oµ al∞ thσ Z-80'≤ nook≤ anΣ ì
crannies¼ anΣ i≤ aε invaluablσ referencσ wheε debugginτ programs.
***** INSIDE CEBUG *************************************************
*** GENERALITIES ***
Quitσ ß numbe≥ oµ change≤ havσ beeε madσ t∩ Cromemco'≤ DEBU╟ ì
t∩ makσ i⌠ int∩ CEBUG« I⌠ woulΣ takσ to∩ mucΦ spacσ t∩ documen⌠ theφ ì
full∙ herσ bu⌠ ╔ wil∞ discus≤ wha⌠ ╔ havσ done¼ anΣ wha⌠ ╔ kno≈ ì
abou⌠ thσ working≤ oµ DEBU╟ s∩ tha⌠ yo⌡ wil∞ bσ ablσ t∩ makσ you≥ ì
owε modification≤ withou⌠ re-inventinτ thσ wheel« Therσ arσ threσ ì
maiε section≤ t∩ thσ prograφ :-
0100 to 01CD INITIALISATIO╬ SECTIO╬ - Relocate≤ thσ residen⌠ ì
áááááááááááááááásection int∩ higΦ memory.
0300 to 24D6 áRESIDENT SECTION - CEBUG Proper.
24D7 to 2910 LIS╘ oµ BIT╙ whicΦ specif∙ whicΦ byte≤ oµ thσ ì
ááááááááááááááááResiden⌠ Sectioε mus⌠ bσ changeΣ s∩ tha⌠ i⌠ wil∞ ruε ì
ááááááááááááááááiε higΦ memory.
2911 to 2CFF Somσ weirΣ bit≤ whicΦ ╔ woulΣ rathe≥ no⌠ tr∙ t∩ ì
ááááááááááááááááexplain« Sometime≤ essentia∞ t∩ thσ prope≥ operatioε ì
ááááááááááááááááoµ thσ Initialisatioε Section«
*** INITIALISATION SECTION ***
Lis⌠ 014╕ t∩ 01C─ t∩ seσ wha⌠ thi≤ sectioε i≤ doing« 010░ ì
jump≤ straigh⌠ t∩ 14╕ whicΦ print≤ ou⌠ thσ sigε oε messagσ whicΦ ì
start≤ a⌠ 0202« 015│ load≤ H╠ witΦ thσ addres≤ oµ thσ jum≡ a⌠ 000╡ ì
whicΦ point≤ t∩ thσ to≡ oµ use≥ memor∙ - thσ bottoφ oµ BDOS« 015╖ ì
load≤ B├ witΦ thσ content≤ oµ 0200« Thi≤ numbe≥ - 21D╖ - point≤ t∩ ì
thσ star⌠ oµ thσ relocatioε bi⌠ lis⌠ minu≤ 300« Sincσ thσ residen⌠ ì
sectioε start≤ a⌠ 030░ anΣ end≤ a⌠ thσ star⌠ oµ thσ bi⌠ list¼ thi≤ ì
numbe≥ i≤ thσ numbe≥ oµ byte≤ iε thσ residen⌠ section« Iε thσ ì
origina∞ DEBUG¼ thσ bi⌠ lis⌠ starteΣ a⌠ 23D7¼ bu⌠ ╔ moveΣ i⌠ u≡ b∙ ì
10░ t∩ givσ rooφ fo≥ thσ extrß program≤ ╔ havσ addeΣ a⌠ thσ enΣ oµ ì
thσ residen⌠ section.
23
è INSIDE CEBUG
015├ subract≤ thσ lengtΦ oµ thσ residen⌠ sectioε froφ thσ ì
addres≤ oµ thσ bottoφ oµ BDOS¼ anΣ 015┼ round≤ thσ resul⌠ t∩ thσ ì
nex⌠ lowes⌠ 10░ bytes« Thi≤ i≤ wherσ CEBU╟ i≤ goinτ t∩ start¼ anΣ i≤ ì
thereforσ thσ ne≈ to≡ oµ use≥ memory« Thi≤ valuσ i≤ writteε int∩ thσ ì
jum≡ instructioε a⌠ 000╡ s∩ tha⌠ al∞ sys-call≤ wil∞ g∩ t∩ thσ bottoφ ì
oµ CEBU╟ anΣ al∞ use≥ program≤ wil∞ thinδ tha⌠ BDO╙ start≤ there« ì
016│ t∩ 018┼ work≤ througΦ thσ residen⌠ sectioε anΣ look≤ a⌠ eacΦ ì
bi⌠ iε thσ bi⌠ lis⌠ t∩ seσ iµ i⌠ wil∞ adΣ (0006⌐ - thσ addres≤ oµ ì
thσ bottoφ oµ CEBU╟ t∩ eacΦ bytσ oµ CEBUG« Thσ firs⌠ bytσ oµ thσ bi⌠ ì
lis⌠ i≤ 24D╖ whicΦ i≤ 0┤ o≥ 000░ 010░ iε binary« Thesσ arσ thσ bit≤ ì
fo≥ thσ byte≤ 030░ t∩ 0307¼ anΣ thσ ▒ mean≤ tha⌠ thσ bytσ a⌠ 030╡ ì
mus⌠ havσ (0006⌐ addeΣ t∩ it« Al∞ thesσ byte≤ whicΦ mus⌠ bσ changeΣ ì
arσ thσ mos⌠ significan⌠ bytσ oµ ß 1╢ bi⌠ addres≤ referencσ t∩ ì
somethinτ insidσ CEBU╟ anΣ thereforσ thei≥ correc⌠ valuσ depend≤ oε ì
wherσ CEBU╟ i≤ running« Sincσ CEBU╟ alway≤ start≤ oε aε addres≤ XX0░ ì
wherσ thσ leas⌠ significan⌠ bytσ i≤ alway≤ zero¼ i⌠ i≤ no⌠ neccesar∙ ì
t∩ changσ thσ leas⌠ significan⌠ bytσ oµ al∞ thesσ addres≤ ì
references.
Oncσ thσ byte≤ havσ beeε changed¼ thσ blocδ movσ a⌠ 019╡ ì
move≤ thσ residen⌠ sectioε u≡ t∩ it≤ appointeΣ statioε jus⌠ belo≈ ì
BDOS« Therσ i≤ ß seconΣ blocδ movσ a⌠ 019─ anΣ whilσ ╔ havσ no⌠ ye⌠ ì
figureΣ ou⌠ it≤ function¼ i⌠ onl∙ move≤ ╣ byte≤ anΣ ╔ woulΣ sa∙ tha⌠ ì
i⌠ ha≤ somethinτ t∩ d∩ witΦ jum≡ tables« Thσ blocδ movσ a⌠ 01B╕ ì
copie≤ thσ littlσ prograφ 01C┴ t∩ 01C─ u≡ t∩ 2D00 whicΦ i≤ thσ ì
highes⌠ addres≤ changeΣ b∙ CEBUG.COM« 01F╞ jump≤ int∩ i⌠ anΣ i⌠ set≤ ì
thσ areß tha⌠ CEBU╟ occupieΣ iε lo≈ memor∙ (010░ t∩ 2D00⌐ t∩ zeroes« ì
Wheε tha⌠ i≤ donσ i⌠ jump≤ int∩ thσ CEBU╟ residen⌠ sectioε whicΦ ì
put≤ ou⌠ it≤ prompt« Thσ CEBU╟ residen⌠ sectioε i≤ 8.5╦ lonτ s∩ thσ ì
top of the Transient Program area is this much lower than normal.
*** RESIDENT SECTION ***
╔ havσ onl∙ exploreΣ thσ area≤ ╔ needeΣ t∩ iε thi≤ section« ì
Thσ codσ i≤ writteε iε ß ver∙ compac⌠ anΣ convoluteΣ fashioε ì
whicΦ make≤ i⌠ quitσ difficul⌠ t∩ follow¼ bu⌠ ╔ aφ surσ thi≤ stylσ ì
ha≤ beeε neccesar∙ t∩ fi⌠ al∞ oµ DEBUG'≤ feature≤ int∩ 8.╡ K« Wheε ì
╔ conside≥ wha⌠ i⌠ al∞ does¼ anΣ thσ fac⌠ tha⌠ i⌠ i≤ dealinτ witΦ ì
thσ ver∙ irregula≥ instructioε se⌠ oµ thσ Z-80¼ ╔ concludσ tha⌠ ì
DEBU╟ i≤ quitσ ß program« ╔ wil∞ discus≤ onl∙ thσ area≤ whicΦ ╔ havσ ì
changeΣ anΣ thσ area≤ whicΦ coulΣ bσ troublesomσ iε thσ future« Wheε ì
yo⌡ looδ a⌠ thσ residen⌠ sectioε iε lo≈ memory¼ remembe≥ tha⌠ al∞ ì
thσ interna∞ addres≤ reference≤ arσ 30░ belo≈ wha⌠ the∙ woulΣ bσ iµ ì
CEBU╟ wa≤ runninτ iε situ« Thi≤ i≤ correcteΣ jus⌠ beforσ i⌠ i≤ moveΣ ì
u≡ t∩ higΦ memory.
04C7 áLD áC,8A
04C9 áCALL á2150 (means 2450) was CALL 0000 (effectively 0005) á
Thi≤ i≤ ß CDO╙ systeφ cal∞ no« 8┴ whicΦ i≤ no⌠ supporteΣ b∙ ì
CPM« DEBU╟ want≤ CDO╙ t∩ d∩ ß 1╢ bi⌠ dividσ a≤ par⌠ oµ it≤ he° t∩ ì
decima∞ conversioε routine« DEBU╟ want≤ thσ resul⌠ oµ HL/D┼ returneΣ ì
iε D┼ anΣ thσ remainde≥ iε HL« ╔ havσ diverteΣ thi≤ t∩ 2450.
24
è INSIDE CEBUG
0500 áLD áC,02
0502 áCALL á21B0 (means 24B0) was CALL 0000
Thi≤ i≤ ß sys-cal∞ t∩ writσ thσ content≤ oµ ┼ t∩ thσ ì
console« ╔ havσ diverteΣ i⌠ t∩ 24B░ wherσ bi⌠ ╖ oµ ┼ i≤ se⌠ t∩ zer∩ ì
becausσ DEBU╟ sometime≤ haΣ i⌠ set« Thi≤ produce≤ graphic≤ ì
characters on some printers and on computers such as the Sorcerer.
0511 áLD áC,80
0513 áCALL á0000
Thi≤ i≤ ß CDO╙ systeφ cal∞ no« 8░ fo≥ "Consolσ reaΣ withou⌠ ì
echoó CP═ doe≤ no⌠ suppor⌠ thi≤ bu⌠ ╔ havσ lef⌠ i⌠ alonσ sincσ i⌠ ì
doesn't seem to do any harm.
06FC áLD áC,89
06FE áCALL á2190 (means 2490) was CALL 0000
CDO╙ sys-cal∞ fo≥ multipl∙ - D┼ ╜ DE*HL« Sincσ thi≤ i≤ no⌠ ì
supporteΣ b∙ CPM¼ i⌠ i≤ diverteΣ t∩ thσ ne≈ multipl∙ routinσ a⌠ ì
2490.
0704 áLD áC,8A
0706 áCALL á2150 (means 2450) was CALL 0000
Anothe≥ dividσ cal∞ diverteΣ t∩ 2450« Thesσ las⌠ tw∩ call≤ ì
are used in hex arithmatic.
083D áLD áC,8D
083F áCALL á0000
CDO╙ sys-cal∞ t∩ returε CDO╙ versioε numbe≥ iε ┬ anΣ releasσ ì
numbe≥ iε C« Sound≤ likσ troublσ t∩ me¼ bu⌠ DEBU╟ ha≤ neve≥ ì
complaineΣ abou⌠ beinτ "incompatablσ witΦ thi≤ CDOS"« Kee≡ aε eyσ oε ì
this one if CEBUG refuses to operate under CPM mutants.
1007 áLD áC,8C
1009 áJP á0000
Thi≤ i≤ thσ CDO╙ sys-cal∞ t∩ ejec⌠ thσ disδ froφ thσ drivσ ì
iε responsσ t∩ aε E╩ commanΣ t∩ DEBUG« Thσ onl∙ wa∙ yo⌡ coulΣ removσ ì
thσ disδ froφ somσ PescΘ drive≤ wa≤ t∩ ge⌠ thσ compute≥ t∩ turε oε ß ì
littlσ moto≥ t∩ ejec⌠ thσ disk« Man∙ Cromemc∩ user≤ havσ sincσ founΣ ì
tha⌠ thσ onl∙ wa∙ t∩ makσ thei≥ compute≥ worδ reliabl∙ i≤ t∩ ejec⌠ ì
thσ PerscΘ disδ drives«
25
è INSIDE CEBUG
11DD áLD áC,86
11DF áCALL á2100 (means 2400) was CALL 0000á á
Thi≤ wa≤ thσ maiε reasoε yo⌡ couldn'⌠ usσ thσ ╞ commanΣ ì
unde≥ CP═ - DEBU╟ useΣ ß CDO╙ sys-cal∞ t∩ forma⌠ you≥ strinτ oµ ì
character≤ int∩ ß Filσ Contro∞ Block« H╠ containeΣ thσ addres≤ oµ ì
thσ strinτ anΣ D┼ pointeΣ t∩ thσ star⌠ oµ thσ FCB« Thi≤ i≤ no≈ ì
diverted to a FCB builder at 2400.
Thσ areß froφ 139┬ t∩ 13C┤ i≤ par⌠ oµ thσ writσ t∩ disδ filσ ì
prograφ anΣ ha≤ beeε changeΣ anΣ simplifieΣ s∩ tha⌠ i⌠ work≤ unde≥ ì
al∞ circumstances« Previousl∙ DEBU╟ lookeΣ t∩ seσ whethe≥ yo⌡ haΣ ì
specifieΣ "SYS.DIRó a≤ yo⌡r filσ namσ, iε whicΦ casσ i⌠ madσ specia∞ ì
arrangments« CDO╙ recogniseΣ SYS.DI╥ a≤ meaninτ thσ disδ director∙ ì
anΣ woulΣ reaΣ anΣ writσ i⌠ likσ an∙ othe≥ filσ, whicΦ wa≤ prett∙ ì
conveinient¼ bu⌠ CP═ doe≤ no⌠ kno≈ anythinτ abou⌠ it« DEBU╟ useΣ t∩ ì
deletσ thσ file¼ creatσ thσ filσ anΣ theε opeε thσ filσ jus⌠ t∩ bσ ì
sure¼ bu⌠ thσ las⌠ operatioε i≤ redundan⌠ unde≥ CPM« Worsσ howeve≥ ì
wa≤ thσ fac⌠ tha⌠ DEBU╟ assumeΣ tha⌠ CDO╙ woulΣ returε witΦ D┼ ì
unchanged¼ bu⌠ unde≥ CP═ (whicΦ i≤ les≤ civiliseΣ thaε CDOS⌐ D┼ ì
woulΣ comσ bacδ differen⌠ iµ yo⌡ selecteΣ ß drivσ othe≥ thaε thσ onσ ì
currentl∙ selected« Thσ ne≈ prograφ i≤ simplσ - i⌠ set≤ D┼ t∩ poin⌠ ì
t∩ thσ FCB¼ delete≤ thσ file¼ set≤ DE¼ make≤ thσ file¼ look≤ fo≥ ì
error≤ anΣ set≤ D┼ agaiε jus⌠ iε case« 13C╡ t∩ 13E┴ writσ sector≤ ì
until BC=0000 at 13C7 when it jumps to 13F1 to close the file.
Thσ origina∞ codσ sectioε oµ DEBU╟ end≤ a⌠ 23CF¼ anΣ thσ bi⌠ ì
lis⌠ whicΦ diΣ star⌠ a⌠ 23D╖ ha≤ beeε moveΣ t∩ 24D7« Startinτ a⌠ ì
240░ arσ thσ extrß program≤ ╔ havσ added« 240░ t∩ 244─ copie≤ thσ ì
character≤ iε ß strinτ pointeΣ t∩ b∙ H╠ int∩ ß FC┬ pointeΣ t∩ b∙ DE« ì
Thi≤ prograφ wa≤ lifteΣ froφ ß cutσ littlσ prograφ calleΣ FILTER« ì
Thσ ideß oµ filte≥ wa≤ tha⌠ yo⌡ jacδ you≥ Cromemc∩ Cobo∞ Compile≥ u≡ ì
b∙ 10░ byte≤ anΣ bol⌠ thi≤ anonymou≤ vira∞ prograφ unde≥ i⌠ s∩ tha⌠ ì
yo⌡ coulΣ usσ i⌠ unde≥ CPM« Filte≥ woulΣ theε prin⌠ ou⌠ ß "WitΦ ì
Filteró messagσ anΣ replicatσ itselµ t∩ thσ to≡ oµ memory¼ jacδ thσ ì
Compile≥ dowε anΣ ruε it« Filte≥ woulΣ theε intercep⌠ noε CP═ sys-ì
call≤ anΣ iµ thσ cal∞ wa≤ fo≥ ß FC┬ i⌠ woulΣ builΣ it« Unfortunatel∙ ì
iµ thσ cal∞ wa≤ fo≥ somethinτ elsσ i⌠ woulΣ bomb.
245░ t∩ 248│ i≤ ß 1╢ bi⌠ dividσ program« H╠ i≤ thσ dividenΣ ì
anΣ D┼ i≤ thσ divisor« Oε returninτ HL=HL/D┼ anΣ DE╜ thσ remainder« ì
This took me more than a few hours to get running properly.
249░ t∩ 24A╕ i≤ ß 1╢ bi⌠ multipl∙ routinσ takeε froε thσ "Z-ì
8░ Technica∞ Manualó I⌠ wa≤ compileΣ oε Januar∙ 2▓ 197╢ whicΦ mean≤ ì
that as a piece of Z-80 code, it is an antique.
26
è INSIDE CEBUG
*** BIT LIST ***
Wheneve≥ yo⌡ makσ change≤ t∩ DEBU╟ o≥ CEBUG¼ yo⌡ wil∞ havσ ì
t∩ conside≥ whethe≥ yo⌡ mus⌠ changσ thσ bi⌠ list« ╔ havσ changeΣ ì
quitσ ß bi⌠ arounΣ 28F╕ becausσ oµ thσ ne≈ programs« T∩ hel≡ yo⌡ ì
calculatσ whicΦ bytσ correspond≤ t∩ thσ codσ yo⌡ arσ changinτ herσ ì
is a command you can give to CEBUG :-
S XXXX-300%8+24D7
áWhere XXXX is the address of the code you are changing.
á á ********
And now a word from our Sponsor -
*******************************************************************
** á á á á á á á á **
** á For Instructions on how You can Modify Your á á **
** á á á á á á á á **
** á <<<<<<<< CASIOTONE INSTRUMENT >>>>>>>>á á **
** á á á á á á á á **
** á M-10, MT-30, MT-40, CT-101, CT-202 :- **
** áExtra features including Octave Drop, Filter Bypass **
** áHalf-Speed Octave Drop, Hold, Pedal Sustain **
** á á á á á á á á **
** á á MT-65, CT-405 and ?????? :- á á **
** á Computer interface for playing notes and defining á **
** á voices is at present under development á á **
** á á á á á á á á **
** á á á á á á á á **
** á Write to - Robin Whittle c/o 42 Yeneda St. á **
** á Nth. Balwyn Victoria 3104 AUSTRALIA á á **
** á á á á á á á á **
** á Phone 03-459-2889 + 613-459-2889 á á **
** á á á á á á á á **
** á á á á á á á á **
*******************************************************************
27
è