Index: trunk/bootcode/airboot.asm
===================================================================
--- trunk/bootcode/airboot.asm	(revision 121)
+++ trunk/bootcode/airboot.asm	(revision 123)
@@ -962,16 +962,8 @@
 IFDEF   AUX_DEBUG
         IF 1
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'## AiR_BOOT_Start ##',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    '## AiR_BOOT_Start ##'
+        PUSHRF
             call    DEBUG_DumpRegisters
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
Index: trunk/bootcode/regular/driveio.asm
===================================================================
--- trunk/bootcode/regular/driveio.asm	(revision 121)
+++ trunk/bootcode/regular/driveio.asm	(revision 123)
@@ -38,17 +38,9 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_CheckFor13extensions:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_CheckFor13extensions:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-
             mov     si, offset [INT13X_DiskParams]
             mov     word ptr [si], 50h
@@ -57,8 +49,5 @@
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpSector
-
-
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -90,21 +79,14 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_LoadConfiguration:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_LoadConfiguration:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
-        ENDIF
-ENDIF
-
+        POPRF
+        ENDIF
+ENDIF
+
+;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
         mov     ax, cs
         mov     es, ax
@@ -117,4 +99,6 @@
         jnc     DIOLC_NoError
         call    MBR_LoadError                 ; Will Abort BootUp
+
+
     DIOLC_NoError:
         ret
@@ -125,18 +109,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_SaveConfiguration:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_SaveConfiguration:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -187,5 +163,5 @@
         mov     al, (MBR_BackUpMBR - Configuration) / 200h
         mov     ah,03h
-
+;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
         int     13h
         jnc     DIOSC_NoError
@@ -275,5 +251,5 @@
         jc      DIOILUT_Error
         and     cl, 111111b    ; Isolate lower 6 bits of CL -> sector count
-
+;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
         ;movzx   ax, cl
         mov   al,cl
@@ -310,16 +286,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_LVMAdjustToInfoSector:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_LVMAdjustToInfoSector:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
+        POPRF
         ENDIF
 ENDIF
@@ -347,16 +317,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'adjusted',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'adjusted'
+        PUSHRF
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
+        POPRF
         ENDIF
 ENDIF
@@ -383,18 +347,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_LoadPartition:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_LoadPartition:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -405,5 +361,9 @@
         mov     wptr cs:[CurPartition_Location+6], cx ; Saves the location
         mov     si, offset PartitionSector    ; DS:SI - ExecBase
+
+
+;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
         call    DriveIO_LoadSector
+
         clc
         cmp     wptr [si+LocBR_Magic], 0AA55h
@@ -436,18 +396,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_SavePartition:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_SavePartition:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -486,19 +438,11 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_LoadLVMSector:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_LoadLVMSector:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             call    AuxIO_DumpSector
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -518,19 +462,11 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'lvm record ex',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'lvm record ex'
+        PUSHRF
             ;~ call    AuxIO_TeletypeHexWord
             ;~ call    AuxIO_TeletypeNL
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpSector
-            ;~ mov     cx, 7
-            mov     cx, 32
+            mov     cx, 7
         @@:
             call    AuxIO_DumpParagraph
@@ -538,6 +474,5 @@
             add     si, 16
             loop @B
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -549,4 +484,5 @@
         jnc     DIOLLVMS_NoLVMSector
         ret
+
         ; This here is called, if an invalid (or no) LVM information sector is found
         ;  It will truncate the first byte of the sector, so all other routines
@@ -564,18 +500,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_SaveLVMSector:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_SaveLVMSector:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -669,18 +597,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_LoadSector:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_LoadSector:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -709,16 +629,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_ReadSectorCHS:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_ReadSectorCHS:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             call    AuxIO_DumpParagraph
             call    AuxIO_TeletypeNL
-        popa
+        POPRF
         ENDIF
 ENDIF
@@ -766,17 +680,15 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'sector loaded',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'sector loaded'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
-            call    AuxIO_DumpSector
-            ;~ call    AuxIO_DumpParagraph
-            ;~ call    AuxIO_TeletypeNL
-        popa
+            ;~ call    AuxIO_DumpSector
+            mov     cx, 32
+        @@:
+            call    AuxIO_DumpParagraph
+            call    AuxIO_TeletypeNL
+            add     si, 16
+            loop @B
+        POPRF
         ENDIF
 ENDIF
@@ -800,18 +712,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_ReadSectorLBA:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_ReadSectorLBA:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             call    AuxIO_DumpParagraph
             call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -879,16 +783,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_WriteSectorLBA:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_WriteSectorLBA:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             call    AuxIO_DumpParagraph
             call    AuxIO_TeletypeNL
-        popa
+        POPRF
         ENDIF
 ENDIF
@@ -991,19 +889,11 @@
 IFDEF   AUX_DEBUG
         IF 1
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_LocateMasterLVMSector:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_LocateMasterLVMSector:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpSector
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -1037,5 +927,5 @@
         mov     si, offset [TmpSector]  ; Offset of temp buffer
         call    DriveIO_ReadSectorLBA   ; Read the sector
-        lahf
+        lahf                            ; Save CF
         dec     cx                      ; Prepare LBA of next sector to read
         sahf                            ; Restore CF
@@ -1234,18 +1124,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_SaveSector:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_SaveSector:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -1350,16 +1232,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_WriteSectorCHS:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_WriteSectorCHS:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             call    AuxIO_DumpParagraph
             call    AuxIO_TeletypeNL
-        popa
+        POPRF
         ENDIF
 ENDIF
@@ -1429,18 +1305,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_LoadMasterLVMSector:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_LoadMasterLVMSector:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -1479,18 +1347,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'geo',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'geo'
+        PUSHRF
             call    DEBUG_DumpRegisters
             call    AuxIO_DumpParagraph
             call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -1503,5 +1363,5 @@
         mov     ah, 42h
         int     13h                                    ; do the i/o, CF=1->error, CF=0->success
-
+;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 IFDEF   AUX_DEBUG
         IF 0
@@ -1543,13 +1403,6 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'lvm record',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'lvm record'
+        PUSHRF
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpSector
@@ -1560,6 +1413,5 @@
             add     si, 16
             loop @B
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -1685,18 +1537,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'DriveIO_GatherDiskInfo:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'DriveIO_GatherDiskInfo:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -1891,3 +1735,3 @@
 secs_per_track_table    db    63,127,255,255,255,255
 
-db_lmlvm    db 'Load Master LVM -- disk: ',0
+;~ db_lmlvm    db 'Load Master LVM -- disk: ',0
Index: trunk/bootcode/regular/other.asm
===================================================================
--- trunk/bootcode/regular/other.asm	(revision 121)
+++ trunk/bootcode/regular/other.asm	(revision 123)
@@ -84,5 +84,4 @@
 
 
-
 ;
 ; DO PREPARING STUFF.
@@ -91,19 +90,11 @@
 
 IFDEF   AUX_DEBUG
-        IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PRECRAP_Main:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        IF 1
+        DBG_TEXT_OUT_AUX    'PRECRAP_Main'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -475,18 +466,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'AFTERCRAP_Main:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'AFTERCRAP_Main:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -512,18 +495,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PRECRAP_CheckConfiguration:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PRECRAP_CheckConfiguration:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
Index: trunk/bootcode/regular/partmain.asm
===================================================================
--- trunk/bootcode/regular/partmain.asm	(revision 121)
+++ trunk/bootcode/regular/partmain.asm	(revision 123)
@@ -517,18 +517,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PART_HidePartition:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PART_HidePartition:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -588,18 +580,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PART_MarkFirstGoodPrimary:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PART_MarkFirstGoodPrimary:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -987,18 +971,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PART_StartPartition:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PART_StartPartition:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -1973,5 +1949,5 @@
 
 IFDEF   AUX_DEBUG
-        IF 1
+        IF 0
         pushf
         pusha
@@ -2240,18 +2216,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PART_IsPrimaryPartition:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PART_IsPrimaryPartition:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
Index: trunk/bootcode/regular/partscan.asm
===================================================================
--- trunk/bootcode/regular/partscan.asm	(revision 121)
+++ trunk/bootcode/regular/partscan.asm	(revision 123)
@@ -32,18 +32,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PARTSCAN_ScanForPartitions:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PARTSCAN_ScanForPartitions:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -52,7 +44,7 @@
         call    PARTSCAN_ResetXref
 
-        mov     dh, TotalHarddiscs
+        mov     dh, [TotalHarddiscs]
         xor     al, al
-        mov     NewPartitions, al
+        mov     [NewPartitions], al
 
         mov     byte ptr [CurIO_Scanning], 1             ; Set flag due scanning partitions
@@ -86,14 +78,7 @@
 ;!
 IFDEF   AUX_DEBUG
-        IF 1
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'[Master LVM Sector]',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        IF 0
+        DBG_TEXT_OUT_AUX    '[Master LVM Sector]'
+        PUSHRF
             xor     bh, bh
             mov     bl, dl
@@ -104,6 +89,5 @@
             mov     ah, dl
             call    DEBUG_DumpRegisters
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -201,18 +185,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PARTSCAN_UpdateDriveLetters:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PARTSCAN_UpdateDriveLetters:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -290,18 +266,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PARTSCAN_ScanDriveForPartitions:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PARTSCAN_ScanDriveForPartitions:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -340,18 +308,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PARTSCAN_ScanPartitionForExtended:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PARTSCAN_ScanPartitionForExtended:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -396,23 +356,15 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PARTSCAN_ScanPartition:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'PARTSCAN_ScanPartition:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
-        ENDIF
-ENDIF
-
-
-        mov     si, offset PartitionSector+446 ; DS:SI - 1st Partition-Entry
+        POPRF
+        ENDIF
+ENDIF
+
+
+        mov     si, offset [PartitionSector+446] ; DS:SI - 1st Partition-Entry
     PSSP_ScanLoop:
         mov     al, bptr [si+LocBRPT_SystemID]
@@ -481,19 +433,11 @@
 
 IFDEF   AUX_DEBUG
-        IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'PARTSCAN_CheckThisPartition:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
-            ;~ call    DEBUG_DumpRegisters
+        IF 1
+        DBG_TEXT_OUT_AUX    'PARTSCAN_CheckThisPartition:'
+        PUSHRF
+            call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -510,7 +454,10 @@
         mov     ax, wptr [si+LocBRPT_RelativeBegin] ; Absolute Sector
         mov     bx, wptr [si+LocBRPT_RelativeBegin+2]
+
+
+
+
         add     ax, wptr [CurPartition_Location+0] ; +Partition-Absolute
         adc     bx, wptr [CurPartition_Location+2] ;  sectors
-
 
 
@@ -575,4 +522,16 @@
         mov     si, offset [LVMSector]
 
+IFDEF   AUX_DEBUG
+        IF 0
+        DBG_TEXT_OUT_AUX    'LVMSector'
+        PUSHRF
+            call    DEBUG_DumpRegisters
+            call    AuxIO_DumpSector
+            ;~ call    AuxIO_DumpParagraph
+            ;~ call    AuxIO_TeletypeNL
+        POPRF
+        ENDIF
+ENDIF
+
         call    LVM_SearchForPartition     ; Search for DX:AX partition
 
@@ -605,4 +564,20 @@
         movsb                               ;  (11 bytes in total)
         pop   di
+
+
+
+IFDEF   AUX_DEBUG
+        IF 0
+        DBG_TEXT_OUT_AUX    'LVMSector-2'
+        PUSHRF
+            mov     si, di
+            call    AuxIO_Print
+            ;~ call    DEBUG_DumpRegisters
+            ;~ call    AuxIO_DumpSector
+            ;~ call    AuxIO_DumpParagraph
+            ;~ call    AuxIO_TeletypeNL
+        POPRF
+        ENDIF
+ENDIF
 
 
Index: trunk/bootcode/special/apm.asm
===================================================================
--- trunk/bootcode/special/apm.asm	(revision 121)
+++ trunk/bootcode/special/apm.asm	(revision 123)
@@ -32,12 +32,5 @@
 IFDEF       AUX_DEBUG
             IF 1
-            pushf
-            pusha
-                mov     si, offset $+5
-                jmp     @F
-                db      10,'>> System Shutdown <<',10,0
-        @@:     call    AuxIO_Print
-            popa
-            popf
+            DBG_TEXT_OUT_AUX    '>> System Shutdown <<'
             ENDIF
 ENDIF
Index: trunk/bootcode/special/lvm.asm
===================================================================
--- trunk/bootcode/special/lvm.asm	(revision 121)
+++ trunk/bootcode/special/lvm.asm	(revision 123)
@@ -59,18 +59,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'LVM_GetSectorCRC:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'LVM_GetSectorCRC:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -198,18 +190,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'LVM_SearchForPartition:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'LVM_SearchForPartition:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -247,18 +231,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'LVM_GetDriveLetter:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'LVM_GetDriveLetter:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -410,16 +386,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'LVM_GetDriveLetter:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'LVM_GetDriveLetter:'
+        PUSHRF
             call    DEBUG_DumpRegisters
             call    AuxIO_DumpParagraph
             call    AuxIO_TeletypeNL
-        popa
+        POPRF
         ENDIF
 ENDIF
@@ -482,18 +452,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'LVM_SetDriveLetter:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'LVM_SetDriveLetter:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -624,18 +586,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'LVM_RemoveVolLetterFromSector:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'LVM_RemoveVolLetterFromSector:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
@@ -673,18 +627,10 @@
 IFDEF   AUX_DEBUG
         IF 0
-        pushf
-        pusha
-            push    si
-            mov     si, offset $+5
-            jmp     @F
-            db      10,'LVM_DoLetterReassignment:',10,0
-            @@:
-            call    AuxIO_Print
-            pop     si
+        DBG_TEXT_OUT_AUX    'LVM_DoLetterReassignment:'
+        PUSHRF
             ;~ call    DEBUG_DumpRegisters
             ;~ call    AuxIO_DumpParagraph
             ;~ call    AuxIO_TeletypeNL
-        popa
-        popf
+        POPRF
         ENDIF
 ENDIF
