;----------MACRO PRINT_STRING ------------------------- ; Input - memory location ; Output - chain of characters displayed. Print_string MACRO String push ax ; Saving only two push dx ; registers used lea dx, string ; Printing mov ah,09h ; string int 21h ; pop dx ; Restoring pop ax ; registers ENDM ;--------------------------------------------- MOVW MACRO W1,W2 push w2 pop w1 ENDM ;------------- MACRO EXIT_PROG---------------- ; Input - none ; Output - none End_Prog MACRO mov ah,4ch int 21h ENDM ;--------------------------------------------z ;Pause - emulation macro. Returns the key pressed. KEY_WAIT MACRO push ax mov ah,01h int 21h pop ax ENDM ;------------------------------------------------------------ MOVE_CURSOR MACRO row,column,page push ax push dx push bx mov ah,2 mov dh,row mov dl,column mov bh,page int 10h pop bx pop dx pop ax ENDM Clear_Screen Macro push ax push bx push cx push dx mov ah,6 xor al,al mov bh,7h xor cx,cx mov dh,24 mov dl,79 int 10h move_cursor 0,0,0 ; Set cursor to the left-upper corner pop dx pop cx pop bx pop ax Endm