Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/06/03 12:10
Read: times


 
#35766 - RE: 9 line or 9 byte instruction?
Hi all,

I believe Steve first mentioned about 9 bytes of instructions and 9 instruction cycles. With addition on 8 entries of look-up table.

My codes complete decoding inputs and give results in 9 bytes instructions and 7 cycles either way. But the internal RAM look-up table is within 16 entries :(
Will it do the job?


;; INPUT: P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0
;; |----|----|----|----|----|----|----|----|
;; | 0 | 0 | 0 | D3 | D2 | D1 | D0 | 0 |
;; |----|----|----|----|----|----|----|----|
;;
;; note: P0.7, P0.6, P0.5 and P0.0 are hardware-grounded
;;
;; OUTPUT: P1 = low byte, P1.7 = MSB, P1.0 = LSB
;; P2 = high byte, P2.7 = MSB, P2.0 = LSB
;;


DSEG at 00h ;; look-up table starting entry in internal RAM
TABLE:
DS 16
STACK:
DS 1


CSEG at 00h
mov SP, #STACK
mov PSW, #10h ;; select bank2
mov A, #01h
mov R0, #00h
mov R1, #08h

;; load values for look-up table
LOAD_TABLE:
mov @R0, A
mov @R1, A
inc R0
inc R1
rlc A
jnc LOAD_TABLE
clr C
clr A


;; decoding routine, byte(s) cycle(s)
DECODE:
mov R0, P0 ;; 2 2
jb P0.3, SECOND ;; 3 2

FIRST:
mov P1, @R0 ;; 2 2
mov P2, A ;; 2 1
jmp DECODE

SECOND:
mov P1, A
mov P2, @R0
jmp DECODE


List of 60 messages in thread
TopicAuthorDate
4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: Competition time !            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: Competition time !            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: Competition time !            01/01/70 00:00      
RE: Competition time !            01/01/70 00:00      
RE: Competition time !            01/01/70 00:00      
RE: Competition time !            01/01/70 00:00      
RE: Competition time !            01/01/70 00:00      
RE: Competition time !            01/01/70 00:00      
RE: Competition time ! 11instruct reset            01/01/70 00:00      
RE: Competition time !            01/01/70 00:00      
RE: Competition time !bart            01/01/70 00:00      
RE: Competition time ! 11instruct reset            01/01/70 00:00      
RE: Competition time ! 11instruct reset            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
Harwware vs Software game.            01/01/70 00:00      
RE: Harwware vs Software game.            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: Harwware vs Software game.            01/01/70 00:00      
RE: Harwware vs Software game.            01/01/70 00:00      
RE: Hardware vs Software game.            01/01/70 00:00      
RE: Hardware vs Software game.            01/01/70 00:00      
RE: code in action            01/01/70 00:00      
RE: code in action            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM Michael @A+PC            01/01/70 00:00      
RE: 4 -> 16 ASM Michael @A+PC / Rob            01/01/70 00:00      
Michael Karas 2nd assembly program text            01/01/70 00:00      
RE: competition rules and prize            01/01/70 00:00      
RE: competition rules and prize            01/01/70 00:00      
RE: competition rules and prize            01/01/70 00:00      
RE: 4 -> 16 ASM Michael @A+PC / Rob            01/01/70 00:00      
RE: competition rules and prize            01/01/70 00:00      
RE: 9 line or 9 byte instruction?            01/01/70 00:00      
RE: 9 line or 9 byte instruction?            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed,Peter            01/01/70 00:00      
RE: 4 -> 16 ASM routines            01/01/70 00:00      
RE: 4 -> 16 ASM routine needed            01/01/70 00:00      
RE: 4 -> 16 ASM... changing assignments            01/01/70 00:00      
RE: 4 -> 16 ASM... changing assignments            01/01/70 00:00      
RE: 4 -> 16 ASM... my mistake            01/01/70 00:00      
RE: 4 -> 16 ASM... my mistake            01/01/70 00:00      
RE: 4 -> 16 ASM.            01/01/70 00:00      
RE: 4 -> 16 ASM.... R0/R1            01/01/70 00:00      
RE: 4 -> 16 ASM. -- Are you serious??            01/01/70 00:00      
RE: 4 -> 16 ASM.... R0/R1            01/01/70 00:00      

Back to Subject List