diff --git a/help/dbg-symbols.html b/help/dbg-symbols.html index 7fb04f90..e4805844 100644 --- a/help/dbg-symbols.html +++ b/help/dbg-symbols.html @@ -6,25 +6,48 @@

Symbols

-

+

When a programmer writes an assembly language program instead of directly referring to a memory address over and over again they use a symbolic name instead. For example, instead of always directly hard-coding $C000 everywhere to read the keyboard they would instead write: -

-    KEYBOARD EQU $C000
-1   LDA KEYBOARD
-    BPL 1
+		

+

+                       ORG $300
+                       KEYBOARD EQU $C000
+300:AD 00 C0 .1        LDA KEYBOARD
+303:10 FB              BPL .1
+305:8D 00 04           STA $0400
+306:60                 RTS
 

-

When debugging assembly programs since you typically don't have the source file availabe you can tell the debugger how to interpret a memory address as a variable name or symbol. - A symbol is the symbolic name and the address assigned to it.

+

+ Let's try this out in the debugger. Make sure AppleWin is running. Press F2 (to reboot), then Ctrl-F2 (to break), and F7 (to enter the debugger.) +   If you don't want to type in the following hex code, you can select it, copy it (Ctrl-C), and paste it into the Debugger console (Ctrl-V). +

+

+300:AD 00 C0 10 FB 8D 00 04 60
+300L
+

+

+ Press F7 to exit the debugger, then type: +

+

+HOME:CALL 768
+

+

+ Press Enter.  The emulated computer will wait for your to press a key and then echo it in the top left. +

+

+ When debugging assembly programs since you typically don't have the source file availabe you can tell the debugger how to interpret a memory address as a variable name or symbol. + A symbol is the symbolic name and the address assigned to it. +

AppleWin supports loading of the assemblers ACME, and Merlin's symbol tables -- a collection of symbols, one per line, organized and collectively called a symbol table. The semi-colon is a comment-till-end-of-line. The file format per line is: ADDRESS SYMBOL

-

e.g. -

+		

e.g.

+

 ; IO Map
 C000 KEYBOARD
 

- -

There are 9 symbol tables to help organize "modules"; each symbol table individually can be turned off/on independently. +

+ There are 9 symbol tables to help organize "modules"; each symbol table individually can be turned off/on independently.

  MAIN    APPLE2E.SYM
  BASIC   A2_BASIC.SYM
@@ -37,11 +60,11 @@ C000 KEYBOARD
  PRODOS  A2_PRODOS.SYM
 

On startup the debugger reads 3 symbol tables by default: Main, Basic, User1.

-

+

Looking up symbols is easy.  If you can't remember an address of a symbol, or the reversse -- can't remember the symbol for an address -- you can use the following symbol commands: - (#### referes to either a hex address or a symbolic name) -

+ (#### referes to either a hex address or a symbolic name) +



@@ -60,10 +83,10 @@ C000 KEYBOARD -

SYM

+

SYM

-

Display +

Display the number of symbols in the Main, User, and Source symbol tables.

@@ -251,7 +274,7 @@ HOME

-

SYM +

SYM LIFE = 300

@@ -260,7 +283,7 @@ LIFE = 300

-

E +

E LIFE 64