Title game2b: timer_tick

extrn timer_flag:byte
public timer_tick

.model small
.code
;timer interrupt procedure
;input:none
;output: sets timer_flag equal to 1
;Method: gets segment of flag and puts in ds. Then set flag equal to one
timer_tick proc

        push ds                         ;save ds
        push ax                         ;save ax
                                
        mov ax,seg timer_flag           ;get segment of flag
        mov ds,ax                       ;put in ds
        mov timer_flag,1                ;set flag
	
        pop ax                          ;restore ax
        pop ds                          ;restore ds

	iret

timer_tick endp                          ;end timer routine

end
