![Rabbit 3000 Скачать руководство пользователя страница 48](http://html2.mh-extra.com/html/rabbit/3000/3000_user-manual_3114034048.webp)
40
Rabbit 3000 Microprocessor
3.4 How to Do It in Assembly Language—Tips and Tricks
3.4.1 Zero HL in 4 Clocks
BOOL HL ; 2 clocks, clears carry, HL is 1 or 0
RR HL
; 2 clocks, 4 total - get rid of possible 1
This sequence requires four clocks compared to six clocks for
LD HL,0
.
3.4.2 Exchanges Not Directly Implemented
HL<->HL’ - eight clocks
EX DE’,HL
; 2 clocks
EX DE’,HL’ ; 4 clocks
EX DE’,HL ; 2 clocks, 8 total
DE<->DE’ - six clocks
EX DE’,HL ; 2 clocks
EX DE,HL ; 2 clocks
EX DE’,HL ; 2 clocks, 6 total
BC<->BC’ - 12 clocks
EX DE’,HL ; 2 clocks
EX DE,HL’ ; 4
EX DE,HL ; 2
EXX ; 2
EX DE,HL ; 2
Move between IX, IY and DE, DE’
IX/IY->DE / DE->IX/IY
;IX, IX --> DE
EX DE,HL
LD HL,IX/IY / LD IX/IY,HL
EX DE,HL ; 8 clocks total
; DE --> IX/ IY
EX DE,HL
LD IX/IY,HL
EX DE,HL
; 8 clocks total
3.4.3 Manipulation of Boolean Variables
Logical operations involving HL when HL is a logical variable with a value of 1 or 0—
this is important for the C language where the least bit of a 16-bit integer is used to repre-
sent a logical result
Logical not operator—invert bit 0 of HL in four clocks (also works for IX, IY in eight
clocks)
DEC HL
; 1 goes to zero, zero goes to -1
BOOL HL ; -1 to 1, zero to zero. 4 clocks total
Logical
xor
operator—
xor HL,DE
when HL/DE are 1 or 0.
ADD HL,DE
RES 1,l ; 6 clocks total, clear bit 1 result of if 1+1=2
Содержание 3000
Страница 1: ...Rabbit 3000 Microprocessor User s Manual 019 0108 020426 A...
Страница 8: ...Rabbit 3000 Microprocessor...
Страница 28: ...20 Rabbit 3000 Microprocessor...
Страница 73: ...User s Manual 65 6 RABBIT INTERNAL I O REGISTERS...
Страница 122: ...114 Rabbit 3000 Microprocessor...
Страница 138: ...130 Rabbit 3000 Microprocessor...
Страница 150: ...142 Rabbit 3000 Microprocessor...
Страница 188: ...180 Rabbit 3000 Microprocessor...
Страница 208: ...200 Rabbit 3000 Microprocessor...
Страница 228: ...220 Rabbit 3000 Microprocessor...
Страница 232: ...224 Rabbit 3000 Microprocessor...
Страница 238: ...230 Rabbit 3000 Microprocessor...
Страница 260: ...252 Rabbit 3000 Microprocessor...
Страница 266: ......