SYMBOLIC DEBUGGER
-----------------



THE SYMBOLIC DEBUGGER IS A BUILT IN MACHINE CODE MONITOR WITH EXTENSIVE USE
OF THE ASSEMBLER'S FACILITIES,SUCH AS SYMBOL TABLE ACCESS,ARITHMETIC
OPERATIONS,AND INPUT IN ANY BASE.IN ADDITION,THE DEBUGGER OFFERS A
DISASSEMBLER,A LINE ASSEMBLER,TRACE,MULTIPLE BREAKPOINTS AS WELL AS EXAMINE/
MODIFY REGISTERS & MEMORY,FILL,COPY,SEARCH etc.


X       -XAMINE ALL REGISTERS
Xr      -XAMINE/MODIFY REGISTER r
Gn      -GOTO ADRESS n
Jn      -JUMP TO SUBROUTINE AT n
Qsn     -QUERY (EXAMINE) MEMORY AT n
Nn      -mNEMONICS OF MEMORY AT n
An      -ASSEMBLE IMMEDIATE AT n
Msn     -MODIFY/EXAMINE MEMORY AT n
Sn      -SINGLE STEP,n STEPS
Fs      -FILL MEMORY (BYTES)
C       -COPY MEMORY
?       -DISPLAY VALUE OF EXPRESSION
@       -SETS COMMAND TAIL
Y       -VDU



VARIOUS DEFAULT VALUES APPLY IF THE NUMERIC PARAMETER IS OMITTED FROM THE
COMMANDS ABOVE.IN THE CASE OF SINGLE STEP,THE DEFAULT IS 1.GOTO,AND JMP TO
SUBR,DEFAULT TO THE CURRENT PC.THE MEMORY ADRESSES IN Q,N,M,AND O,ALL
DEFAULT TO THE LAST USED ADRESS OF ONE OF THE FOUR (THE CURRENT OBJECT
LOCATION).IN ADDITION,A SIZE CAN BE SPECIFIED FOR F,Q,AND M.THIS WILL
DEFAULT TO BYTE,BUT .W OR .L CAN BE SPECIFIED FOR WORD OR LONGWORD
OPERATIONS.



X-XAMINE REGISTER
-----------------
THE 8 DATA, 8 ADRESS , PC , SR, USP AND SSP REGISTERS ARE DISPLAYED.
THE FLAGS INDICATED BY BITS IN THE STATUS REGISTER ARE EXPLICITLY DISPLAYED
AND THE CURRENT INSTRUCTION (i.e. THE ONE WHICH WOULD BE EXECUTED NEXT)
IS DISASSEMBLED AND DISPLAYED.


THE FORMAT OF THE DISPLAY IS:

D0=00000000 00000000 0000000 00000000 D4=00000000 00000000 00000000 00000000
A0=00000000 00000000 0000000 00000000 A4=00000000 00000000 00000000 00000000
SSP=00000000 USP=00000000 SR=A31F tsxn/vc PC=000000 BR   $000008


ACROSS THE TOPLINE ARE THE 8 DATA REGISTERS, D0, D1, D2, D3, D4, D5, D6, D7.
THE NEXT LINE DISPLAYS THE ADRESS REGISTERS, A0, A1, A2, A3, ....  , A6
AND THE STACKPOINTER A7 WHICH IS THE USER OR SUPERVISOR SP DEPENDING ON THE
'S'BIT IN THE STATUS REGISTER.
THE THIRD LINE DISPLAYS THE TWO STACKPOINTERS, THE STATUS REGISTER WORD,
THE FLAGS SET IN THE STATUSREGISTER, THE PROGRAMM COUNTER, AND THE
INSTRUCTION AT WHICH IT POINTS.


Xr- XAMINE/MODIFY REGISTER
--------------------------
THE REGISTER INDICATED BY r ID DISPLAYED, AND THE CONTEST CAN BE ALTERED.
TO ALTER THE VALUE, JUST TYPE IN THE NEW VALUE, FOLLOWED BY <RET>, AND
THE NEW VALUE WILL BE DISPLAYED. IF NO CHANGE IS REQUIRED, JUST TYPE <RET>.
ALL REGISTERS ARE 32 BITS EXCEPT FOR SR, WHICH IS 16. SP AND A7 REFER TO USP
OR SSP, DEPENDING ON THE S BIT OF THE STATUS REGISTER.

VALID REGISTERS ARE:

D0...D7           DATA REGISTERS
A0...A7           ADRESS REGISTERS
SP                STACK POINTER (=A7)
USP               USER STACK POINTER
SSP               SUPERVISOR STACK POINTER
SR                STATUS REGISTER (16 BIT)
PC                PROGRAMM COUNTER

IN ADDITION THE FOLLOWING POINTERS CAN BE EXAMINED AND MODOFIED:

SOF      START OF SOURCE POINTER           SOL       START OF LINK POINTER
EOF      END OF SOURCE POINTER             EOL       END OF LINK POINTER



Gn - GOTO ADRESS n
------------------

THE ADRESS n IS PLACED IN THE PROGRAMMCOUNTER, IF n IS NOT GIVEN, THE PC
REMAINS UNCHANGED. BREAKPOINTS ARE PROMPTED FOR, UP TO 8 IN ALL. TO SET A
BREAKPOINT, JUST TYPE IN THE ADRESS AFTER THE PROMPT. TYPING <RET> AFTER
A PROMPT SETS NO BREAKPOINT, AND BEGINS TO EXECUTE THE CODE FROM THE ADRESS
IN PC.

Jn - JUMP TO SUBROUTINE
-----------------------

SEE G ABOVE, ONLY A RETURN ADRESS IS PLACED ON THE STACK (IF SR=USER
MODE,USP. IF SR=SUPERVISOR MODE, SSP). THE STACKS ARE RESET THUS ANY
INFORMATION PREVIOUSLY ON THE STACK IS LOST.
NOTE THAT ON RETURN, THE PC POINTS TO AN ILLEGAL INSTRUCTION, SOMEWHERE IN
THE HEART OF SEKA. THIS IS CORRECT, IT IS USED AS A BREAKPOINT. SINCE THE
RTS INSTARUCTION LOSES THE VALUE OF PC BEFORE RETURN, THERE IS NO WAY TO
TELL IF YOU EXITED VIA A NORMAL EXIT OR NOT.


Qsn - QUERY MEMORY
------------------
128 BYTES, 64 WORDS OR 32 LONGWORDS OF MEMORY ARE DISPLAYED IN HEX
STARTING AT n, OR DEFAULTING TO THE CURRENT OBJECT LOCATION.
THE CURRENT OBJECT LOCATION IS ADVANCED TO THE ADRESS ONE AFTER THE LAST
BYTE. THE ASCII CHARACTERS REPRESENTED BY THIS ARE DISPLAYED ON THE RIGHT OF
THE HEX DISPLAY.


Nn - mNEMONICS
--------------
16 LINES OF CODE ARE DISASSEMBLED TO THEW SCREEN, STARTING AT n, OR
DEFAULTING TO THE CURRENT OBJECT LOCATION. THE CURRENT OBJECT LOCATION IS
ADVANCED TO ONE PAST THE LAST ADRESS DISPLAYED. SEE SECTION ON DISASSEMBLER,
BELOW.


An - ASSEMBLE IMMEDIATE
-----------------------
THE ADRESS n IS DISPLAYED, AND THE USER IS IN IMMEDIATE ASSEMBLY MODE.
AN INSTRUCTION MAY BE ENTERED, AND IT WILL BE ASSEMBLED DIRECTLY INTO
MEMORY, AND THE NEXT ADRESS WILL BE DISPLAYED. THE MODE MAY BE EXITED
BY TYPING <ESC>. IF AN ERROR IS MADE IN THE mNEMONIC, AN ERROR MESSAGE
WILL BE DISPLAYED, AND THE MODE EXITED. NOTE: IT IS NOT POSSIBLE TO OMIT
n FOR THIS COMMAND, BUT " A*" MAY BE TYPED, TO INDICATE TO ASSEMBLE FROM
THE CURRENT LOCATION.


Msn - MODIFY/EXAMINE MEMORY
---------------------------

THE ADRESS n , DEFAULTING TO THE CURRENT OBJECT LOCATION IS DISPLAYED,
AND THE CONTENTS OF THE BYTE, WORD OR LONGWORD IS ALSO DISPLAYED.
TO MODIFY THIS LOCATION, SIMPLY TYPE IN THE DESIRED VALUE, AND THE DISPLAYED
MEMORY WILL UPDATE ITSELF. TO ADVANCE TO THJE NEXT LOCATION, TYPE JUST
<RET>. TO EXIT TO SEKA COMMAND MODE TYPE <ESC>.


Sn - SINGLE STEP
----------------

THE S COMMAND WILL SINGLE STEP THE PROGRAM, USING THE TRACE FACILITY
ON THE 68000. IF n IS SPECIFIED, n STEPS WILL BE PERFORMED BEFORE REPORTING
BACK TO THE DEBUGGER. THE PC MUST BE SET UP BEFOREHAND, EITHER AS A RESULT
OF A PREVIOUS S OR G COMMAND OR AS A RESULT OF AN EXPLICIT XPC.

STEP WILL NOT TRACE THROUGH TRAP CALLS OR LINE-A LINE-F CALLS SINCE
THESE WILL USUALLY BE CALLS TO THE OPERATING SYSTEM. THIS IS DONE
AUTOMATICALLY BY STEP BY PLACING A BREAKPOINT AFTER THE CALL.



Fs-FILL
-------
THREE PARAMETERS WILL BE PROMPTED FOR,BEGIN,END,AND DATA.THE DATA BYTE,WORD
OR LONGWORD WILL BE FILLED IN BETWEEN BEGIN UP TO,BUT NOT INCLUDING END.



C-COPY
------
THREE PARAMETERS WILL BE PROMPTED FOR,BEGIN,END,AND DESTINATION.
THE MEMORY WILL BE COPIED FROM THE AREA BEGIN UP TO,BUT NOT INCLUDING END,TO
THE AREA STARTING AT DEST.THE COPY IS AN INTELLIGENT COPY(?),AND WILL NOT
OVERWRITE THE DATA IT IS COPYING,EVEN IF THE DESTINATION AREA OVERLAPS THE
SOURCE AREA.



?-DISPLAY VALUE
---------------
THE EXPRESSION OR VALUE AFTER THE ? WILL BE EVALUATED,AND THE RESULT
DISPLAYED IN DECIMAL AND HEXADECIMAL.THIS IS USEFUL FOR EVERYTHING FROM
EXAMINING THE VALUE OF A SYMBOL TO PERFORMING CALCULATIONS.IT CAN ALSO BE
USED TO CONVERT FROM ONE BASE TO ANOTHER.



@-SET COMMAND TAIL
------------------
THIS COMMAND TAKES A TEXT STRING AS AN ARGUMENT,AND IT SETS THE "COMMAND
TAIL" AREA OF THE BASE PAGE FOR THE OBJECT PROGRAM TO BE THE TEXT
STRING.??????????????



Y-VDU
-----
THIS ENTERS A SIMPLE VDU MODE,WHERE THE SCREEN AND KEYBOARD COMMUNICATE WITH
A DEVICE ON THE SERIAL LINE,USING DEFAULT BAUDRATE AND CHARACTERISTICS.
SET ON POWER UP OR A ANOTHER INITALIZATION PROGRAM.EXIT BY TYPING <CTRL-C>.
NOTE:<CTRL-C>,<CTRL-S> AND <CTRL-Q> ARE INTERPRETED IN THE NORMAL
CONTEXT,AND NOT SET DOWN THE SERIAL LINE.



DISASSEMBLER
------------

A STANDARD FEATURE OF SEKA IS SIMPLE LINE DISASSEMBLER,FULLY INTEGRATED WITH
THE MAIN ASSEMBLER PACKAGE.THE MNEMONICS USED ARE STANDARD MOTOROLA- JUST
LIKE THE ASSEMBLER. THE DISASSEMBLER IS INVOKED BY THE COMMAND N (FOR
mNEMONICS) FOLLOWED BY AN ADRESS. 16 LINES ARE DISPLAYED.

THE DISASSEMBLER CAN DISASSEMBLE ALL 68000 INSTRUCTIONS,BUT IS NOT DEFINED
FOR INVALID INSTRUCTIONS. IT SHOULD ALWAYS BE REMEMBERED THAT SOME AREAS OF
MEMORY ARE DATA AREAS AND DO NOT CONTAIN VALID CODE. DISASSEMBLING THESE CAN
GIVE INCORRECT INSTRUCTIONS - YOU HAVE BEEN WARNED!!!

ALTHOUGH ITS PRIMARY FUNCTION IS AS A DEBUGGING AID(S),IT CAN BE USED TO
DISASSEMBLE BLOCKS OF CODE.THIS CAN BE A SLOW PROCESS,BUT THE LINE
DISASSEMBLER IS PREFERABLE TO NONE.

IT SHOULD BE REMEMBERED THAT SOME INSTRUCTIONS CAN DISPLAY DIFFERENTLY TO
THE INSTRUCTION TYPED INTO THE ASSEMBLER.ALL NUMBERS AND ADRESSES ARE
DISASSEMBLED IN HEX,AND ALTHOUGH .B .W AND .L SUFFIXES ARE SOMETIMES ADDED
IN PLACE WHERE THEY COULD BE OMITTED,IN UNAMBIGUOUS PLACES THEY ARE OFTEN
NOT DISPLAYED. INSTRUCTIONS WHERE THE ASSEMBLER HAS USED A QUICKFORM,etc.
,ARE DISPLAYED AS SUCH.IN ADDITION,INSTRUCTIONS SUCH AS EXG CAN DISPLAY THE
REGISTERS IN EITHER ORDER - THE FUNCTION IS IDENTICAL.

END OF CHAPTER4
(C)1987 BY CAPTAIN CHAOS & CAPTAIN HOLLIDAY FROM THE CAPTAIN CREW





