Gain Immediate access to our Essays
FREE access exchanged for your work, or pay £9.99
Words: | Submitted: Mon Jun 19 2006
... Send AL to Port One (The traffic lights). MOV BL,01 ; Moves value ( 1 ) into BL CALL 80 ; Call Subroutine 80 (delay routine) ; RED / RED AMBER MOV AL,98 ; Copy 10011000 into the AL register. OUT 01 ; Send AL to Port One (The traffic lights). MOV BL,02 ; Moves value ( 2 ) into BL CALL 80 ; Call Subroutine 80 (delay routine) ; RED / GREEN MOV AL,84 ; Copy 10000100 into the AL register. OUT 01 ; Send AL to Port One (The traffic lights). MOV BL,F ; Moves value ( F - 15SECS ) into BL CALL 80 ; Call Subroutine 80 (delay routine) ; RED / AMBER MOV AL,88 ; Copy 10010000 into the AL register. OUT 01 ; Send AL to Port One (The traffic lights). MOV BL,02 ; Moves value ( 2 ) into BL CALL 80 ; Call Subroutine 80 (delay routine) JMP Start ; Jump back to the start. ORG 80 ; Subroutine 80 ( Delay Routine ) flag: CMP BL,0 ; Compare BL to ( 0 ) JNZ flag ; Jump if not ( 0 ) RET ; Return to where it was called from ORG 90 ; Subroutine 90 ( Interrupt Routine ...
FREE access exchanged for your work, or pay £9.99