org 010h
start:
:
:
mov a,020h ; setup table high byte address
mov tbhp,a
mov a,005h ; setup table low byte address
mov tblp,a ; table pointer address is now 2005H
tabrdc temp ; read table data from PC address 2005H
nop ; ²FFH² will be placed in temp register
; and ²55H² will be placed in TBLH
; register
codesec1 .section at 000h ¢code¢ ; Bank 1 code located here
org 0000h ; this defines the offset from the
; start address of Bank 1 which is
; 2000H
dc 000AAh, 011BBh, 022CCh, 033DDh, 044EEh, 055FFh
:
:
Because the TBLH register is a read-only register and cannot be restored, care should be taken to
ensure its protection if both the main routine and Interrupt Service Routine use the table read in
-
structions. If using the table read instructions, the Interrupt Service Routines may change the
value of the TBLH and subsequently cause errors if used again by the main routine. As a rule it is
recommended that simultaneous use of the table read instructions should be avoided. However,
in situations where simultaneous use cannot be avoided, the interrupts should be disabled prior to
the execution of any main routine table-read instructions. Note that all table related instructions re
-
quire two instruction cycles to complete their operation.
Except HT48RU80/HT48CU80
Instruction
Table Location Bits
b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
TABRDC [m] PC12 PC11 PC10 PC9 PC8 @7 @6 @5 @4 @3 @2 @1 @0
TABRDL [m]
11111@7@6@5@4@3@2@1@0
HT48RU80/HT48CU80
Instruction
Table Location Bits
b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
TABRDC
[m] TBHP TBHP TBHP TBHP TBHP TBHP @7 @6 @5 @4 @3 @2 @1 @0
TABRDL
[m]111111@7@6@5@4@3@2@1@0
Note 1. PC12~PC8: Current Program Counter bits.
2. @7~@0: Table Pointer TBLP bits.
3. For the HT48RU80/HT48CU80, the Table address location is 14 bits, i.e. from b13~b0.
4. For the HT48R70A-1/HT48C70-1, the Table address location is 13 bits, i.e. from b12~b0.
5. For the HT48R50A-1/HT48C50-1, the Table address location is 12 bits, i.e. from b11~b0.
6. For the HT48R30A-1/HT48C30-1, the Table address location is 11 bits, i.e. from b10~b0.
7. For the HT48R10A-1/HT48C10-1, the Table address location is 10 bits, i.e. from b9~b0.
Chapter 1 Hardware Structure
27