??? 02/20/10 14:25 Read: times |
#173352 - some change Responding to: ???'s previous message |
GETCMD: MOV A,#0 ACALL CHAR_IN ;WAIT FOR PC TO SENT A CHARACTER ;NOW PROCESS CJNE A,#'1',NOT1 ;IF ITS NOT 1 THEN CHECK NEXT POSSIBILITY ACALL SUB1 ;ELSE ITS 1 sjmp ENDCHK ; avoid undefined ACC behavior of other subroutines NOT1: CJNE A,#'2',NOT2 ;IF ITS NOT 2 THEN CHECK NEXT POSSIBILITY ACALL SUB2 ;ELSE ITS 2 sjmp ENDCHK ; avoid undefined ACC behavior of other subroutines NOT2: CJNE A,#'3',NOT3 ;IF ITS NOT 3 THEN CHECK NEXT POSSIBILITY ACALL SUB3 ;ELSE ITS 3 sjmp ENDCHK ; avoid undefined ACC behavior of other subroutines NOT3: CJNE A,#'4',NOT4 ;IF ITS NOT 4 THEN CHECK NEXT POSSIBILITY ACALL SUB4 ;ELSE ITS 4 NOT4: ENDCHK: RET SUB1: MOV A, #01h sjmp sub1234 SUB2: MOV A, #02h sjmp sub1234 SUB3: MOV A, #04h sjmp sub1234 SUB4: MOV A, #01h ; sjmp sub1234 sub1234: MOV P2, A ;TURN ON PORT2 PIN 0 ACALL DELAY MOV P2, #00h RET |
Topic | Author | Date |
Question on asm code | 01/01/70 00:00 | |
2 things | 01/01/70 00:00 | |
some change | 01/01/70 00:00 | |
even simpler | 01/01/70 00:00 | |
thanks for the simplified | 01/01/70 00:00 | |
yes, and even simpler | 01/01/70 00:00 | |
code and comments | 01/01/70 00:00 | |
;; ?? | 01/01/70 00:00 | |
thanks for the explanation | 01/01/70 00:00 | |
Short? | 01/01/70 00:00 | |
need some helps | 01/01/70 00:00 | |
Your circuit should work | 01/01/70 00:00 | |
Getting Rid Of Power On Relay Energize | 01/01/70 00:00 | |
Thank You All![]() | 01/01/70 00:00 | |
document what happens to ACC. | 01/01/70 00:00 | |
noticed and questions | 01/01/70 00:00 |