; oscilliscope and 1Hz timer (turn it on in Peripherals each run of program)
;each timer interrupt will change oscilloscope value
   
Connect	hwtimer		;directive to use timer so don't have to manually select it each run
Connect scope
      
	JMP 	Start
	DB	0	;value to output to oscilloscope
	DB	40	;increment value
	DB	0	;direction of increment 0=up, 1=down
		
Start:
;initialize 8255 for mode 0.  required
	MOV     AL,80
        OUT     26,AL
     
;nothing else to do so wait here
here:	JMP 	here
	
	HLT		                         


;ISR for  timer (type 2 interrupt, so just make PROC INT2 in Micro86)
PROC INT2		

	MOV	AL,[1003]	;get output value
        OUT     20,AL  		;output to oscilloscope
                
        ADD	AL,[1004]	;add increment value 
        MOV	[1003],AL	;store back in memory
;not implementing up/down....
	IRET

