You are on page 1of 2

Address Opcode Label Mnemonics Comments

;Fix DC value,
1000 C6,C0,FF START MOV AL,0FFH Set maximum data
1003 E6,C0 OUT C0,AL DAC port
1005 C6,C0,00 MOV AL,00 Set GATE low
1008 E6,D8 OUT D8,AL
;Initializing timer and load max value
100A CALL DELAY Delay to stabilize motor
100D C6 ,C0,30 MOV AL,30H Timer in mode 0
1010 E6,CE OUT CE,AL Timer control port
1012 C6,C0,FF MOV AL,0FFH Maximum data for counter
1015 E6,C8 OUT C8,AL Counter 0 port (LSB)
1017 E6,C8 OUT C8,AL Counter 0 port (MSB)
;Enabling Gate for 1 second
1019 C6,C0,00 MOV AL,00
101C E6,D0 OUT D0,AL Make GATE high
101E CALL DELAY Delay for 1 second
1121 C6,C0,00 MOV AL,00
1124 E6,D8 OUT D8,AL Make GATE low
;Data input
1126 IN AX,C8 Data IN from counter 0
1128 89,06,00,11 MOV [1100],AX Data stored in memory
112C F4 HLT
;1 Second Delay Routine
1050 C6,C1,03 MOV CL,03
1057 4A LOOP2 DEC DX
1058 75 LOOP JNZ LOOP1
105A 1 DEC CL
105C 75 JNZ LOOP2
105E RET