2020-03-01 13:03:35 +01:00
|
|
|
dump:
|
|
|
|
push ax
|
|
|
|
push cx
|
|
|
|
push dx
|
|
|
|
push bx
|
2020-03-01 17:43:23 +01:00
|
|
|
mov al, 0x0A
|
|
|
|
call putc
|
|
|
|
mov al, 0x0D
|
|
|
|
call putc
|
2020-03-01 13:03:35 +01:00
|
|
|
mov cx, 4
|
|
|
|
.loop_line:
|
|
|
|
push cx
|
|
|
|
push bx
|
|
|
|
mov ax, bx
|
|
|
|
call print16
|
2020-03-01 17:43:23 +01:00
|
|
|
mov al, ':'
|
|
|
|
call putc
|
|
|
|
mov al, ' '
|
|
|
|
call putc
|
2020-03-01 13:03:35 +01:00
|
|
|
mov cx, 0x8
|
|
|
|
.loop_bin:
|
|
|
|
mov ax, [bx]
|
|
|
|
xchg al, ah
|
|
|
|
inc bx
|
|
|
|
inc bx
|
|
|
|
call print16
|
|
|
|
mov dl, ' '
|
|
|
|
call CONOUT
|
|
|
|
loop .loop_bin
|
|
|
|
pop bx
|
|
|
|
mov cx, 0x10
|
|
|
|
.loop_ascii:
|
|
|
|
mov dl, '.'
|
|
|
|
cmp byte [bx], 0x20
|
|
|
|
jc .print
|
|
|
|
cmp byte [bx], 0x80
|
|
|
|
jnc .print
|
|
|
|
mov dl, [bx]
|
|
|
|
.print:
|
|
|
|
inc bx
|
|
|
|
call CONOUT
|
|
|
|
loop .loop_ascii
|
|
|
|
pop cx
|
|
|
|
mov dl, 0x0A
|
|
|
|
call CONOUT
|
|
|
|
mov dl, 0x0D
|
|
|
|
call CONOUT
|
|
|
|
loop .loop_line
|
|
|
|
pop bx
|
|
|
|
pop dx
|
|
|
|
pop cx
|
|
|
|
pop ax
|
|
|
|
ret
|