;Your name and date go here ;Exercise number goes here ;============================================================================================ ;This program does the following... ; ; ;============================================================================================ .MODEL small ;All our code will be in one code segment .stack 300h ;Reserve some space for the stack PUSHALL MACRO ;Macros are used to save register states PUSH AX ;on procedure calls PUSH BX PUSH CX PUSH DX PUSH SI PUSH DI PUSHF ENDM POPALL MACRO POPF POP DI POP SI POP DX POP CX POP BX POP AX ENDM .data ;Here is where we define variables (these are examples) row DB 12d ;Define "row" to be byte sized and to hold 12d temp DW ? ;Define "temp" to be a word sized variable (no initial value) key DB 'z' ;Define "key" to be the lower case z (ascii) message DB 'Hi there',00h ;Defines an ascii array with termination byte "00h" value EQU 1h ;Equate "value" to 1h table1 DB 40h,79h,24h,30h,19h ;Define a table of 5 consecutive byte-sized values .code ;+++++++++++++++++++main program++++++++++++++++++++++++++++++++++++++ start: mov ax,@data ;MUST BE HERE: Get the address of the data segment mov ds,ax ;MUST BE HERE: Set the DS segment ; YOUR CODE GOES HERE - DON'T PUT INT 20 or INT 3 HERE ;+++++++++++++++++++end program+++++++++++++++++++++++++++++++++++++++ ;;********Ending code ;mov ax,0C07h ;OPTIONAL: Function 0Ch = "FLUSH BUFFER AND READ STANDARD INPUT" ;int 21h ;OPTIONAL: Waits for a key to be pressed to exit program. mov ax, 4C00h ;MUST BE HERE: the exit fuction [4C+no error (00)] int 21h ;MUST BE HERE: call DOS interrupt 21h ;;********Ending Code ;=====================subroutine CLS============================== ;clear video screen by getting and setting video mode ;uses BIOS INT 10H ;inputs -- none ;outputs -- none ;destroys -- nuthin' ;----------------------------------------------------------------- cls proc near pushall ;uses pushall macro sub bh,bh mov ah,0Fh int 10h sub ah,ah int 10h popall Ret cls EndP end start