TESTHMA - 3


or ax, ax

jz error

mov ah, 9h

mov dx, OFFSET okmsg

int 21h

; A20

mov ah, 9h

mov dx, OFFSET loc_enA20

int 21h

mov ax,0500h

call cs:[HMMEntry]

or ax, ax

jz error

mov ah, 9h

mov dx, OFFSET okmsg

int 21h

; A20

mov ah, 9h

mov dx, OFFSET check_A20

int 21h

mov ax,0700h

call cs:[HMMEntry]

or ax, ax

jz error

mov ah, 9h

mov dx, OFFSET okmsg

int 21h

;

mov ah, 9h

mov dx, OFFSET free_ext_mem

int 21h

mov ax,0800h

call cs:[HMMEntry]

push ax

mov ax, dx

call Print_word

mov ah, 9h

mov dx, OFFSET max_ext_block

int 21h

pop ax

call Print_word

; A20

mov ah, 9h

mov dx, OFFSET loc_dsA20

int 21h

mov ax,0600h

call cs:[HMMEntry]

or ax, ax

jz error

mov ah, 9h

mov dx, OFFSET okmsg

int 21h

jmp terminate

error:

push bx

mov ah, 9h

mov dx, OFFSET errmsg

int 21h

pop ax

call Print_word

terminate:

;

;

mov ax, 4C00h

int 21h

; AX

Print_word proc near

;--------------------

push ax

push bx

push dx

push ax

mov cl,8

rol ax,cl

call Byte_to_hex

mov bx,dx

@@out_ch bh

@@out_ch bl

pop ax

call Byte_to_hex

mov bx,dx

@@out_ch bh

@@out_ch bl

pop dx

pop bx

pop ax

ret

Print_word endp

Byte_to_hex proc near

;--------------------

; al - input byte

; dx - output hex

;--------------------

push ds

push cx

push bx

lea bx,tabl

mov dx,cs

mov ds,dx

push ax

and al,0fh

xlat

mov dl,al

pop ax

mov cl,4

shr al,cl

xlat

mov dh,al

pop bx

pop cx

pop ds

ret

tabl db '0123456789ABCDEF'

Byte_to_hex endp

END begin