rdos/kernel/debug.asm

31 lines
464 B
NASM

; this prints registers
; expect to be called as interrupt routine
isr_debug:
push ss
push es
push ds
push di
push si
push bp
push sp
push dx
push cx
push bx
push ax
call printf
db "AX=%X BX=%X CX=%X DX=%X SP=%X BP=%X SI=%X DI=%X", 0x0A, 0x0D
db "DS=%X ES=%X SS=%X IP=%X CS=%X FL=%X", 0x0A, 0x0D, 0
pop ax
pop bx
pop cx
pop dx
pop sp
pop bp
pop si
pop di
pop ds
pop es
pop ss
iret