Professional Documents
Culture Documents
OEP3
OEP3
;<Program title>
;data
;code
4203 00 start: nop
4204 21 00 01 BEG: LXI H, 0100H ; Load the memory address 0100H into H-L pai…
4207 22 00 00 HR_MIN: SHLD 0000H ; Store the current clock value (HH:…
4211 3A 02 00 LDA 0002H ; Load the current seconds value from memory…
4214 C6 01 ADI 01H ; Add 1 to the seconds value
4216 27 DAA ; Decimal adjust the accumulator
4217 FE 60 CPI 60H ; Compare the seconds value with 60H (60 dec…
4219 C2 0A 042 JNZ N_SEC ; Jump to N_SEC if not equal to 60 (not reac…
421C 2A 00 00 LHLD 0000H ; Load the clock value (HH:MM) from memory a…
421F 7D MOV A, L ; Move the contents of L register to accumul…
4220 C6 01 ADI 01H ; Add 1 to the minutes value
4222 27 DAA ; Decimal adjust the accumulator
4223 6F MOV L, A ; Move the modified minutes value back to L …
4224 FE 60 CPI 60H ; Compare the minutes value with 60H (60 dec…
4226 C2 07 042 JNZ HR_MIN ; Jump to HR_MIN if not equal to 60 (not rea…
4230 FE 24 CPI 24H ; Compare the hours value with 24H (24 decim…
4232 C2 07 042 JNZ HR_MIN ; Jump to HR_MIN if not equal to 24 (not rea…
4235 C3 04 042 JMP BEG ; Jump back to BEG to continue the clock ope…
423A 11 FF 0 L1: LXI D, 00FFH ; Load D register with initial count for tim…
http://www.gnusim8085.org/