Index: trunk/bootcode/regular/debug.asm
===================================================================
--- trunk/bootcode/regular/debug.asm	(revision 83)
+++ trunk/bootcode/regular/debug.asm	(revision 84)
@@ -28,5 +28,6 @@
 ; in that case. To compensate for that, the FX code is disabled when debugging
 ; is active. Also, most of the debug-routines can selectively be disabled
-; by commenting-out the define above it.
+; by setting the 'IF' directive to 0 or 1. Setting to 0 does an immediate
+; return, setting to 1 enables the routine.
 
 
@@ -35,4 +36,6 @@
 DB 'DEBUG',0
 ENDIF
+
+
 
 ;
@@ -70,5 +73,6 @@
 ;
 dbh     db  10
-        db  'h=HELP, d=DRIVE-LETTERS, g=GEO, i=IPT, r=RESTART, v=VOL-LETTERS, x=XREF',10
+        db  'h=HELP, d=DBGSCR-TOGGLE',10
+        db  'l=DRIVE-LETTERS, g=GEO, i=IPT, r=RESTART, v=VOL-LETTERS, x=XREF',10
         db  '0-9=disk 80h-89h info',10
         db  10,0
@@ -85,9 +89,10 @@
 
 
+
 ;
 ; Call list for debug hot-keys.
 ;
 dbg_call_list:
-        db      'd'
+        db      'l'
         dw      offset  DEBUG_DumpDriveLetters
         db      'g'
@@ -107,4 +112,6 @@
         db      0
 
+
+
 ;
 ; Handle keypresses when the main menu is active.
@@ -180,5 +187,5 @@
 
 ;
-; Show not assigned message.
+; Show 'not assigned' message.
 ;
 dbg_na  db  'This key is not assigned, press ''h'' for Help.',10,0
@@ -226,15 +233,16 @@
 
 
+
 ;
 ; Check the simple 32-bit math functions.
 ;
-;~ __CHECK_MATH__  EQU
-DEBUG_CheckMath Proc    Near
-    IFDEF   __CHECK_MATH__
+IF  0
+db_testmul32   db "## CHK MUL32 ##",10,0
+DEBUG_Test_MATH_Mul32   Proc    Near
         pushf
         pusha
 
         ; Msg check math-module
-        mov     si,offset db_checkmath
+        mov     si,offset [db_testmul32]
         call    AuxIO_Print
 
@@ -304,7 +312,12 @@
         popa
         popf
-    ENDIF
-        ret
-DEBUG_CheckMath EndP
+        ret
+DEBUG_Test_MATH_Mul32   EndP
+ELSE
+DEBUG_Test_MATH_Mul32   Proc    Near
+        ret
+DEBUG_Test_MATH_Mul32   EndP
+ENDIF
+
 
 
@@ -312,7 +325,6 @@
 ; Dump the geometry.
 ;
-__DUMP_GEO__    EQU
+IF  0
 DEBUG_DumpGeo   Proc
-    IFDEF   __DUMP_GEO__
         pushf
         pusha
@@ -360,8 +372,12 @@
         popa
         popf
-    ENDIF
-
         ret
 DEBUG_DumpGeo   Endp
+ELSE
+DEBUG_DumpGeo   Proc
+        ret
+DEBUG_DumpGeo   Endp
+ENDIF
+
 
 
@@ -369,7 +385,6 @@
 ; Dump the internal partition table.
 ;
-__DUMP_IPT__    EQU
+IF  0
 DEBUG_DumpIPT   Proc
-    IFDEF   __DUMP_IPT__
         pushf
         pusha
@@ -383,7 +398,12 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpIPT   EndP
+ELSE
+DEBUG_DumpIPT   Proc
+        ret
+DEBUG_DumpIPT   EndP
+ENDIF
+
 
 
@@ -391,7 +411,6 @@
 ; Dump the new  partitions table.
 ;
-;~ __DUMP_NPT__    EQU
+IF  0
 DEBUG_DumpNewPartTable  Proc
-    IFDEF   __DUMP_NPT__
         pushf
         pusha
@@ -404,7 +423,11 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpNewPartTable  EndP
+DEBUG_DumpNewPartTable  Proc
+        ret
+DEBUG_DumpNewPartTable  EndP
+ENDIF
+
 
 
@@ -412,7 +435,6 @@
 ; Dump the partition pointers table.
 ;
-;~ __DUMP_PP__     EQU
+IF  0
 DEBUG_DumpPartitionPointers     Proc
-    IFDEF   __DUMP_PP__
         pushf
         pusha
@@ -431,7 +453,12 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpPartitionPointers     EndP
+ELSE
+DEBUG_DumpPartitionPointers     Proc
+        ret
+DEBUG_DumpPartitionPointers     EndP
+ENDIF
+
 
 
@@ -439,7 +466,7 @@
 ; Dump the partition x-ref table.
 ;
-__DUMP_PX__     EQU
+IF  0
+xrt     db  10,'XrefTable:',10,0
 DEBUG_DumpPartitionXref     Proc
-    IFDEF   __DUMP_PX__
         pushf
         pusha
@@ -460,7 +487,12 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpPartitionXref     EndP
+ELSE
+DEBUG_DumpPartitionXref     Proc
+        ret
+DEBUG_DumpPartitionXref     EndP
+ENDIF
+
 
 
@@ -468,7 +500,7 @@
 ; Dump the dl-feature drive-letters.
 ;
-__DUMP_DL__     EQU
+IF  0
+ddl     db  10,'Driveletters:',10,0
 DEBUG_DumpDriveLetters      Proc
-    IFDEF   __DUMP_DL__
         pushf
         pusha
@@ -498,14 +530,20 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpDriveLetters      EndP
+ELSE
+DEBUG_DumpDriveLetters      Proc
+        ret
+DEBUG_DumpDriveLetters      EndP
+ENDIF
+
+
 
 ;
 ; Dump some disk information.
 ;
-__DUMP_DI__     EQU
+IF  0
+ddi     db  10,'DumpDiskInfo:',10,0
 DEBUG_DumpDiskInfo          Proc
-    IFDEF   __DUMP_DI__
         pushf
         pusha
@@ -521,14 +559,20 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpDiskInfo          EndP
+ELSE
+DEBUG_DumpDiskInfo          Proc
+        ret
+DEBUG_DumpDiskInfo          EndP
+ENDIF
+
+
 
 ;
 ; Dump the lvm volume drive-letters.
 ;
-__DUMP_VL__     EQU
+IF  0
+dvl     db  10,'VolumeLetters:',10,0
 DEBUG_DumpVolumeLetters     Proc
-    IFDEF   __DUMP_VL__
         pushf
         pusha
@@ -548,8 +592,11 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpVolumeLetters     EndP
-
+ELSE
+DEBUG_DumpVolumeLetters     Proc
+        ret
+DEBUG_DumpVolumeLetters     EndP
+ENDIF
 
 
@@ -558,6 +605,5 @@
 ; Dump the registers.
 ;
-__DUMP_REG__    EQU
-IFDEF   __DUMP_REG__
+IF  1
 regAX   db  'AX:',0
 regBX   db  ' BX:',0
@@ -576,12 +622,10 @@
 ;~ regFS   db  'FS:',0
 ;~ regGS   db  ' GS:',0
-ENDIF
 DEBUG_DumpRegisters     Proc
-    IFDEF   __DUMP_REG__
         pushf
         pusha
 
         push    si
-        mov     si, offset regAX
+        mov     si, offset [regAX]
         call    AuxIO_Print
         call    AuxIO_TeletypeHexWord
@@ -659,7 +703,12 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpRegisters     EndP
+ELSE
+DEBUG_DumpRegisters     Proc
+        ret
+DEBUG_DumpRegisters     EndP
+ENDIF
+
 
 
@@ -667,7 +716,6 @@
 ; Dump CHS values.
 ;
-__DUMP_CHS__    EQU
+IF  0
 DEBUG_DumpCHS   Proc    Near
-    IFDEF   __DUMP_CHS__
         pushf
         pusha
@@ -700,7 +748,12 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpCHS   EndP
+ELSE
+DEBUG_DumpCHS   Proc    Near
+        ret
+DEBUG_DumpCHS   EndP
+ENDIF
+
 
 
@@ -708,7 +761,6 @@
 ; Dump BSS.
 ;
-;~ __DUMP_BSS__    EQU
+IF  0
 DEBUG_DumpBSSSectors    Proc    Near
-    IFDEF   __DUMP_BSS__
         pushf
         pusha
@@ -737,7 +789,12 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpBSSSectors    EndP
+ELSE
+DEBUG_DumpBSSSectors    Proc    Near
+        ret
+DEBUG_DumpBSSSectors    EndP
+ENDIF
+
 
 
@@ -745,7 +802,6 @@
 ; Dump 6-bit packed hide partition table.
 ;
-;~ __DUMP_HPT__    EQU
+IF  0
 DEBUG_DumpHidePartTables    Proc    Near
-    IFDEF   __DUMP_HPT__
         pushf
         pusha
@@ -778,7 +834,12 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_DumpHidePartTables    EndP
+ELSE
+DEBUG_DumpHidePartTables    Proc    Near
+        ret
+DEBUG_DumpHidePartTables    EndP
+ENDIF
+
 
 
@@ -786,7 +847,6 @@
 ; Check the bitfield routines.
 ;
-;~ __CBF__     EQU
+IF  0
 DEBUG_CheckBitFields    Proc
-    IFDEF   __CBF__
         pushf
         pusha
@@ -818,8 +878,11 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_CheckBitFields    EndP
-
+ELSE
+DEBUG_CheckBitFields    Proc
+        ret
+DEBUG_CheckBitFields    EndP
+ENDIF
 
 
@@ -828,7 +891,6 @@
 ; Dump information before the partition is booted.
 ;
-;~ __DMP2__    EQU
+IF  0
 DEBUG_Dump2     Proc  Near
-    IFDEF   __DMP2__
         pushf
         pusha
@@ -908,14 +970,18 @@
         popa
         popf
-    ENDIF
         ret
 DEBUG_Dump2     EndP
-
-
-
-xrt     db  10,'XrefTable:',10,0
-ddl     db  10,'Driveletters:',10,0
-ddi     db  10,'DumpDiskInfo:',10,0
-dvl     db  10,'VolumeLetters:',10,0
+ELSE
+DEBUG_Dump2     Proc  Near
+        ret
+DEBUG_Dump2     EndP
+ENDIF
+
+
+
+;
+; These strings can also be referenced outside the debug module when debugging
+; is enabled.
+;
 dlra    db  10,'LVM_DoLetterReassignment: ',0
 ptetb   db  10,'Partition Table Entry to boot',10,0
@@ -927,6 +993,4 @@
 ;~ db_mbr              db "## MBR ##",10,0
 ;~ db_masterlvm        db "## MLVMR ##",10,0
-
-;~ db_checkmath        db "## CHK MATH ##",10,0
 
 
Index: trunk/bootcode/regular/driveio.asm
===================================================================
--- trunk/bootcode/regular/driveio.asm	(revision 83)
+++ trunk/bootcode/regular/driveio.asm	(revision 84)
@@ -943,5 +943,5 @@
         pusha
         push    si
-        mov     si,offset dioss
+        mov     si,offset [dioss]
         call    AuxIO_Print
         pop     si
Index: trunk/bootcode/regular/partmain.asm
===================================================================
--- trunk/bootcode/regular/partmain.asm	(revision 83)
+++ trunk/bootcode/regular/partmain.asm	(revision 84)
@@ -1125,5 +1125,5 @@
 IFDEF   AUX_DEBUG
     pusha
-    mov     si,offset ptetb
+    mov     si,offset [ptetb]
     call    AuxIO_Print
     call    DEBUG_DumpRegisters
Index: trunk/bootcode/special/lvm.asm
===================================================================
--- trunk/bootcode/special/lvm.asm	(revision 83)
+++ trunk/bootcode/special/lvm.asm	(revision 84)
@@ -468,5 +468,5 @@
     IFDEF   AUX_DEBUG
         pusha
-        mov     si, offset dlra
+        mov     si, offset [dlra]
         call    AuxIO_Print
         call    AuxIO_Teletype
