BITS 16
|
|
; Routine for dumping memory
|
|
; pointer in 'si', length is 'cx'
|
|
dumpmem:
|
|
pusha
|
|
;push ax
|
|
;push dx
|
|
mov si, start_sing_os
|
|
mov cx, 512
|
|
call printCRLF_os
|
|
shr cx, 1
|
|
xor dx, dx ; zero dx
|
|
.loop:
|
|
cmp dx, cx
|
|
jae .end
|
|
mov ax, word [esi + 2*edx]
|
|
call dumpax_os
|
|
mov ax, 0xe20
|
|
int 0x10
|
|
inc dx
|
|
jmp .loop
|
|
.end:
|
|
;pop dx
|
|
;pop ax
|
|
popa
|
|
ret
|