Changeset 45 for trunk/BOOTCODE/REGULAR/DEBUG.ASM
- Timestamp:
- Apr 12, 2014, 12:36:45 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/REGULAR/DEBUG.ASM
r44 r45 37 37 38 38 DEBUG_CheckMath Proc Near 39 pushf 40 pusha 41 42 ; Msg check math-module 43 mov si,offset db_checkmath 44 call AuxIO_Print 45 46 ; Output hex-word 47 mov ax,0BABEh 48 call AuxIO_TeletypeHexWord 49 50 mov al,' ' 51 call AuxIO_Teletype 52 mov al,'*' 53 call AuxIO_Teletype 54 mov al,' ' 55 call AuxIO_Teletype 56 57 ; Output hex-word 58 mov ax,0BABEh 59 call AuxIO_TeletypeHexWord 60 61 mov al,' ' 62 call AuxIO_Teletype 63 mov al,'=' 64 call AuxIO_Teletype 65 mov al,' ' 66 call AuxIO_Teletype 67 68 mov ax,0BABEh 69 mul ax 70 call AuxIO_TeletypeHexDWord 71 72 ; Start new line 73 call AuxIO_TeletypeNL 74 75 ; Output hex-dword 76 mov dx,0DEADh 77 mov ax,0FACEh 78 call AuxIO_TeletypeHexDWord 79 80 mov al,' ' 81 call AuxIO_Teletype 82 mov al,'*' 83 call AuxIO_Teletype 84 mov al,' ' 85 call AuxIO_Teletype 86 87 ; Output hex-dword 88 mov dx,0DEADh 89 mov ax,0FACEh 90 call AuxIO_TeletypeHexDWord 91 92 mov al,' ' 93 call AuxIO_Teletype 94 mov al,'=' 95 call AuxIO_Teletype 96 mov al,' ' 97 call AuxIO_Teletype 98 99 mov bx,0DEADh 100 mov cx,0FACEh 101 mov dx,0DEADh 102 mov ax,0FACEh 103 call MATH_Mul32 104 call AuxIO_TeletypeHexQWord 105 106 ; Start new line 107 call AuxIO_TeletypeNL 108 39 ;~ pushf 40 ;~ pusha 41 ;~ 42 ;~ ; Msg check math-module 43 ;~ mov si,offset db_checkmath 44 ;~ call AuxIO_Print 45 ;~ 46 ;~ ; Output hex-word 47 ;~ mov ax,0BABEh 48 ;~ call AuxIO_TeletypeHexWord 49 ;~ 50 ;~ mov al,' ' 51 ;~ call AuxIO_Teletype 52 ;~ mov al,'*' 53 ;~ call AuxIO_Teletype 54 ;~ mov al,' ' 55 ;~ call AuxIO_Teletype 56 ;~ 57 ;~ ; Output hex-word 58 ;~ mov ax,0BABEh 59 ;~ call AuxIO_TeletypeHexWord 60 ;~ 61 ;~ mov al,' ' 62 ;~ call AuxIO_Teletype 63 ;~ mov al,'=' 64 ;~ call AuxIO_Teletype 65 ;~ mov al,' ' 66 ;~ call AuxIO_Teletype 67 ;~ 68 ;~ mov ax,0BABEh 69 ;~ mul ax 70 ;~ call AuxIO_TeletypeHexDWord 71 ;~ 109 72 ;~ ; Start new line 110 call AuxIO_TeletypeNL 111 112 popa 113 popf 73 ;~ call AuxIO_TeletypeNL 74 ;~ 75 ;~ ; Output hex-dword 76 ;~ mov dx,0DEADh 77 ;~ mov ax,0FACEh 78 ;~ call AuxIO_TeletypeHexDWord 79 ;~ 80 ;~ mov al,' ' 81 ;~ call AuxIO_Teletype 82 ;~ mov al,'*' 83 ;~ call AuxIO_Teletype 84 ;~ mov al,' ' 85 ;~ call AuxIO_Teletype 86 ;~ 87 ;~ ; Output hex-dword 88 ;~ mov dx,0DEADh 89 ;~ mov ax,0FACEh 90 ;~ call AuxIO_TeletypeHexDWord 91 ;~ 92 ;~ mov al,' ' 93 ;~ call AuxIO_Teletype 94 ;~ mov al,'=' 95 ;~ call AuxIO_Teletype 96 ;~ mov al,' ' 97 ;~ call AuxIO_Teletype 98 ;~ 99 ;~ mov bx,0DEADh 100 ;~ mov cx,0FACEh 101 ;~ mov dx,0DEADh 102 ;~ mov ax,0FACEh 103 ;~ call MATH_Mul32 104 ;~ call AuxIO_TeletypeHexQWord 105 ;~ 106 ;~ call AuxIO_TeletypeNL 107 ;~ call AuxIO_TeletypeNL 108 ;~ 109 ;~ popa 110 ;~ popf 114 111 115 112 ret … … 118 115 119 116 DEBUG_DumpGeo Proc 120 pushf121 pusha122 123 ; BIOS cyls124 mov dx,word ptr [BIOS_Cyls+02]125 mov ax,word ptr [BIOS_Cyls+00]126 call AuxIO_TeletypeHexDWord127 call AuxIO_TeletypeNL128 129 ; BIOS heads130 mov dx,word ptr [BIOS_Heads+02]131 mov ax,word ptr [BIOS_Heads+00]132 call AuxIO_TeletypeHexDWord133 call AuxIO_TeletypeNL134 135 ; BIOS secs136 mov dx,word ptr [BIOS_Secs+02]137 mov ax,word ptr [BIOS_Secs+00]138 call AuxIO_TeletypeHexDWord139 call AuxIO_TeletypeNL140 141 ; Bytes per sector142 mov ax,[BIOS_Bytes]143 call AuxIO_TeletypeHexWord144 call AuxIO_TeletypeNL145 146 ; Total secs147 mov bx, word ptr [BIOS_TotalSecs+06]148 mov cx, word ptr [BIOS_TotalSecs+04]149 mov dx, word ptr [BIOS_TotalSecs+02]150 mov ax, word ptr [BIOS_TotalSecs+00]151 call AuxIO_TeletypeHexDWord152 call AuxIO_TeletypeNL153 154 ; CHS to LBA155 mov dx,1156 mov ax,29e5h157 mov bx,23h158 mov cx,9h159 call CONV_CHS2LBA160 call AuxIO_TeletypeHexDWord161 call AuxIO_TeletypeNL162 163 popa164 popf117 ;~ pushf 118 ;~ pusha 119 ;~ 120 ;~ ; BIOS cyls 121 ;~ mov dx,word ptr [BIOS_Cyls+02] 122 ;~ mov ax,word ptr [BIOS_Cyls+00] 123 ;~ call AuxIO_TeletypeHexDWord 124 ;~ call AuxIO_TeletypeNL 125 ;~ 126 ;~ ; BIOS heads 127 ;~ mov dx,word ptr [BIOS_Heads+02] 128 ;~ mov ax,word ptr [BIOS_Heads+00] 129 ;~ call AuxIO_TeletypeHexDWord 130 ;~ call AuxIO_TeletypeNL 131 ;~ 132 ;~ ; BIOS secs 133 ;~ mov dx,word ptr [BIOS_Secs+02] 134 ;~ mov ax,word ptr [BIOS_Secs+00] 135 ;~ call AuxIO_TeletypeHexDWord 136 ;~ call AuxIO_TeletypeNL 137 ;~ 138 ;~ ; Bytes per sector 139 ;~ mov ax,[BIOS_Bytes] 140 ;~ call AuxIO_TeletypeHexWord 141 ;~ call AuxIO_TeletypeNL 142 ;~ 143 ;~ ; Total secs 144 ;~ mov bx, word ptr [BIOS_TotalSecs+06] 145 ;~ mov cx, word ptr [BIOS_TotalSecs+04] 146 ;~ mov dx, word ptr [BIOS_TotalSecs+02] 147 ;~ mov ax, word ptr [BIOS_TotalSecs+00] 148 ;~ call AuxIO_TeletypeHexDWord 149 ;~ call AuxIO_TeletypeNL 150 ;~ 151 ;~ ; CHS to LBA 152 ;~ mov dx,1 153 ;~ mov ax,29e5h 154 ;~ mov bx,23h 155 ;~ mov cx,9h 156 ;~ call CONV_CHS2LBA 157 ;~ call AuxIO_TeletypeHexDWord 158 ;~ call AuxIO_TeletypeNL 159 ;~ 160 ;~ popa 161 ;~ popf 165 162 166 163 ret … … 186 183 call AuxIO_TeletypeNL 187 184 185 ;~ call DEBUG_DumpHidePartTables 186 188 187 ;~ call DEBUG_CheckMath 189 188 190 189 ;~ call DEBUG_DumpGeo 191 190 192 call DEBUG_CheckBitFields191 ;~ call DEBUG_CheckBitFields 193 192 194 193 popa … … 199 198 200 199 DEBUG_DumpBSSSectors Proc Near 200 ;~ pushf 201 ;~ pusha 202 ;~ 203 ;~ mov si, offset [PartitionSector] 204 ;~ call AuxIO_DumpSector 205 ;~ call AuxIO_TeletypeNL 206 ;~ 207 ;~ mov si, offset [JfsPBR] 208 ;~ call AuxIO_DumpSector 209 ;~ call AuxIO_TeletypeNL 210 ;~ 211 ;~ mov si, offset [LVMSector] 212 ;~ call AuxIO_DumpSector 213 ;~ call AuxIO_TeletypeNL 214 ;~ 215 ;~ mov si, offset [TmpSector] 216 ;~ call AuxIO_DumpSector 217 ;~ call AuxIO_TeletypeNL 218 ;~ 219 ;~ mov si, offset [NewPartTable] 220 ;~ call AuxIO_DumpSector 221 ;~ call AuxIO_TeletypeNL 222 ;~ call AuxIO_TeletypeNL 223 ;~ 224 ;~ popa 225 ;~ popf 226 ret 227 DEBUG_DumpBSSSectors EndP 228 229 230 DEBUG_DumpHidePartTables Proc Near 201 231 pushf 202 232 pusha 203 233 204 mov si, offset [PartitionSector] 234 mov cx,3 235 mov si, offset [HidePartitionTable] 236 again1: 205 237 call AuxIO_DumpSector 206 call AuxIO_TeletypeNL 207 208 mov si, offset [JfsPBR] 238 add si,512 239 loop again1 240 call AuxIO_TeletypeNL 241 242 mov cx,3 243 mov si, offset [PartitionXref] 244 again2: 245 call AuxIO_DumpParagraph 246 call AuxIO_TeletypeNL 247 add si,16 248 loop again2 249 call AuxIO_TeletypeNL 250 251 mov cx,3 252 mov si, offset [NewHidePartTable] 253 again3: 209 254 call AuxIO_DumpSector 210 call AuxIO_TeletypeNL 211 212 mov si, offset [LVMSector] 213 call AuxIO_DumpSector 214 call AuxIO_TeletypeNL 215 216 mov si, offset [TmpSector] 217 call AuxIO_DumpSector 218 call AuxIO_TeletypeNL 219 220 mov si, offset [NewPartTable] 221 call AuxIO_DumpSector 222 call AuxIO_TeletypeNL 255 add si,512 256 loop again3 223 257 call AuxIO_TeletypeNL 224 258 … … 226 260 popf 227 261 ret 228 DEBUG_Dump BSSSectors EndP262 DEBUG_DumpHidePartTables EndP 229 263 230 264 231 265 DEBUG_CheckBitFields Proc 232 pushf 233 pusha 234 235 mov bx,offset [ott] 236 237 mov al,0 238 mov dl,0 239 mov dh,6 240 DEBUG_CheckBitFields_next_write: 241 call CONV_SetBitfieldValue 242 inc al 243 inc dl 244 ;~ cmp dl,70 245 jnz DEBUG_CheckBitFields_next_write 246 247 mov dl,0 248 mov dh,6 249 DEBUG_CheckBitFields_next_read: 250 mov al,dl 251 call AuxIO_TeletypeHexByte 252 mov al,':' 253 call AuxIO_Teletype 254 call CONV_GetBitfieldValue 255 call AuxIO_TeletypeHexWord 256 call AuxIO_TeletypeNL 257 inc dl 258 ;~ cmp dl,70 259 jnz DEBUG_CheckBitFields_next_read 260 261 popa 262 popf 266 ;~ pushf 267 ;~ pusha 268 ;~ 269 ;~ mov bx,offset [ott] 270 ;~ 271 ;~ mov al,0 272 ;~ mov dl,0 273 ;~ mov dh,6 274 ;~ DEBUG_CheckBitFields_next_write: 275 ;~ call CONV_SetBitfieldValue 276 ;~ inc al 277 ;~ inc dl 278 ;~ jnz DEBUG_CheckBitFields_next_write 279 ;~ 280 ;~ mov dl,0 281 ;~ mov dh,6 282 ;~ DEBUG_CheckBitFields_next_read: 283 ;~ mov al,dl 284 ;~ call AuxIO_TeletypeHexByte 285 ;~ mov al,':' 286 ;~ call AuxIO_Teletype 287 ;~ call CONV_GetBitfieldValue 288 ;~ call AuxIO_TeletypeHexWord 289 ;~ call AuxIO_TeletypeNL 290 ;~ inc dl 291 ;~ jnz DEBUG_CheckBitFields_next_read 292 ;~ 293 ;~ popa 294 ;~ popf 263 295 ret 264 296 DEBUG_CheckBitFields EndP
Note:
See TracChangeset
for help on using the changeset viewer.