| ★ CODING ★ SOURCES ★ Coding source &002 ★ |
; **** Charge A avec $00 ****HERMOL, 1 juin 2003 pour http://cpcrulez.fr
Methode 1:
ld a,0 ; 2 bytes, 2 cycles, Doesn't affect flagsMethode 2:
xor a ; 1 byte, 1 cycle, Flag results: C=0, Z=1; **** Compare A to $00 ****
Methode 1:
cp 0 ; 2 bytes, 2 cyclesMethode 2:
or a ; 1 byte, 1 cycleMethode 3:
and a ; 1 byte, 1 cycle; **** Call/Return ****
Methode 1: ; 4 bytes, 10 cycles
...
call sub
retMethode 2: ; 3 bytes, 4 cycles
...
jp sub; **** Exchange DE & HL ****
Methode 1: ; 6 bytes, 6 cycles
ld a,d
ld d,h
ld h,a
ld a,e
ld e,l
ld l,aMethode 2: ; 4 bytes, 9 cycles
push de
ld d,h
ld e,l
pop hlMethode 3: ; thx power
ex de,hl; **** HL = -HL ****
Methode 1: ; 7 bytes, 8 cycles
ld a,l
cpl
ld l,a
ld a,h
cpl
ld h,a
inc hlMethode 2: ; 7 bytes, 7 cycles
xor a
sub l
ld l,a
ld a,0
sbc h
ld h,a; **** A = CONST - A ****
Methode 1: ; 4 bytes, 4 cycles
ld b,a
ld a,CONST
sub bMethode 2: ; 3 bytes, 3 cycles
cpl
add CONST+1; **** HL = HL + A ****
Methode 1: ; 6 bytes, 6 cycles
add l
ld l,a
ld a,0
adc h
ld h,aMethod 2: ; 5 bytes, 5 cycles
add l
ld l,a
jr nc,.notcarry
inc h
.notcarry:; **** decremente de 1 les 4 bits haut de A ****
Methode 1:
rra
rra
rra
rra
dec a
rla
rla
rla
rlaMethode 2:
sub #10 ; wouff , thx Targhan / Arkos
[next=coding_src]
| A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser... |
» Coding Listing - Rsx - Bankswap (CPC Amstrad International)![]()
» Coding Source 12 Scrolloverscan
» Coding Listing - Mc - Hinter
» Coding Listing - Rsx - Mix Your Modes (Popular Computing Weekly)
» Coding Listing - Screen Dump For Epson (Computing With The Amstrad)
» Coding Listing - Graphic - Vertikalspiegelung (CPC Amstrad International)![]()
» Coding Source 64 - Modification Et Listage Des Secteurs d'Une Disquette (Cahier de l'Amstrad)
» Coding Listing - Serpent (The Amstrad User)
» Coding Listing - Graphic - Infinite Colours (Popular Computing Weekly)
CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ CPC RULEZ
Page créée en 072 millisecondes et consultée 128 fois |




