converter
ZXNet echo conference «code.zx»
From Kirill Frolov → To Igor Kiselev 13 September 2000
Press RESET immediately, Igor!
10 Sep 00 22:22, Igor Kiselev wrote to All:
IK> Does anyone have the following procedure, it is very necessary. Desirable
IK> fast.
IK> At the input to HL, the number is the same at the output, decomposed into bytes
IK> number.
IK> input: register HL=#C000
IK> output: memory +0 #34 - "4"
IK> +1 #39 - "9"
IK> +2 #31 - "1"
IK> +3 #35 - "5"
IK> +4 #32 - "2"
I asked for it myself, here’s a quick one:
I’ll warn you right away - you can do it even faster, here writing to the buffer is slow.
=== Cut ===
─ Personal mail (2:5030/827.2) ───────────────────────── X.PERSONAL (CODE.ZX) ─
Msg: 71 of 97 RCV
From : Aleksey Malov 500:8362/1.3 26 Aug 00
To : Kirill Frolov 31 Aug 00
Subj: The idea is formed ;)
─────────────────── ──────────────────── ──────────────────── ────────────────────
* Forwarded from area 'CODE.ZX'
Greetings, Kirill!
Thu 24 Aug 2000 at 15:47:48 Kirill Frolov and Aleksandr Majorov were talkingon the topic The idea has formed ;).
KF> Only 1621 cycles for number translation!
KF> 2All: Who can do it faster?
I asked for it myself. I have 636 cycles (if I'm not mistaken).
;in: hl - number
;out: at address buffer, representation of the input number as an ascii string (without
discarding insignificant zeros)
bin2asc ld b,0
ld a,h
rlca
rlca
rlca
ld h,a
and 7 ;34
rl h
adc a,a
yeah
rl h
adc a,a
yeah
rl h
adc a,a
yeah
;82
rl h
adc a,a
yeah
rl b
rl h
adc a,a
yeah
rl b
rl l
adc a,a
yeah
rl b
;154
rl l
adc a,a
yeah
ldc,a
ld a,b
adc a,a
yeah
ld b,a
;190
rl l
ld a,c
adc a,a
yeah
ldc,a
ld a,b
adc a,a
yeah
ld b,a
rl l
ld a,c
adc a,a
yeah
ldc,a
ld a,b
adc a,a
yeah
ld b,a
rl l
ld a,c
adc a,a
yeah
ldc,a
ld a,b
adc a,a
yeah
ld b,a
;310
rl l
ld a,cadc a,a
daa
ld c,a
ld a,b
adc a,a
daa
ld b,a
rl d
rl l
ld a,c
adc a,a
daa
ld c,a
ld a,b
adc a,a
daa
ld b,a
rl d
;406
rl l
ld a,c
adc a,a
daa
ld c,a
ld a,b
adc a,a
daa
ld b,a
ld a,d
rla
and 7
;461
ld de,#0f30
ld hl,buffer
add a,e
ld (hl),a
inc hl
;498
ld a,b
rrca
rrca
rrca
rrca
and d
add a,e
ld (hl),a
inc hl
ld a,b
and d
add a,e
ld (hl),a
inc hl
;564
ld a,c
rrca
rrca
rrca
rrca
and d
add a,e
ld (hl),a
inc hl
ld a,c
and d
add a,e
ld (hl),a
ret ;636
buffer ds 5
Счастливо, Kirill! С вами был Vivid/Brainwave^X-Project.
[ZX] [Sailor Moon]
-+- Lara Croft за 4.50 $.
+ Origin: Multik will be the best! (500:8362/1.3)
=== Cut ===