Olden Z80
Today we open a new column -
gift for men (?), which is not bread
feed, and let me create a stunning assebmlere kakuyunibud
procedure. :)
We hope this section will appear
in our paper often enough, but to ensure this, unfortunately,
is impossible. After Encoders are used to communicate in the
native language, and therefore to explain to the death
principle of any team is often to
They are more difficult than to perform on the Chinese
language of Russian folk songs. ;-)
And now we present you with Ivan Roshchina (Moscow), the
author BestViev and numerous publications in the press, which
can be say, and opens a new heading. :)
__________________________________________
(C) Ivan Roshchin, 1999
Bring to your attention the program,
which is very useful when
to print a copy of Spectrum screen in greatly enlarged form.
This program encodes a display file in a text pseudo-file, and
it's easy You can print on your printer. After printing, just
to get a picture format A2. However, the image can be cut into
pieces in a text editor and print on
parts, if your printer does not support A2.
__________________________________________
; Log: from # 4000 - display file (b / w)
; Output: from # 8000 - text file (the length of # 6100)
; Size of the object code: 103 bytes.
DESTIN EQU # 8000
LD DE, # 00BF; coordinates
LD HL, DESTIN; address txt
LD B, 128
LP_MAIN PUSH BC; main loop
LP_2 CALL GET_P
ADD A, A
LD B, A
INC D
CALL GET_P
DEC D
ADD A, B
EXX
LD HL, DECODE
LD D, 0
LD E, A
ADD HL, DE
LD A, (HL)
EXX
LD (HL), A
INC HL
DEC E
LD A, E
CP -1
JR NZ, LP_2
INC D
INC D
LD E, 191
LD (HL), 13; code
INC HL; translation
LD (HL), 10; line
INC HL
POP BC
DJNZ LP_MAIN
RET
;----------------------------------------
DECODE DB "","~","~","~"; characters
;----------------------------------------; Procedure GET_P - to
find the color point ;
; Login: DE - point coordinates (X, Y)
; Output: A - color (0 or 1)
;
And the values of other registers are unchanged.
GET_P PUSH HL
PUSH DE
PUSH BC
LD A, E
AND A
RRA
SCF
RRA
AND A
RRA
XOR E
AND # F8
XOR E
LD H, A
LD A, D
RLCA
RLCA
RLCA
XOR E
AND # C7
XOR E
RLCA
RLCA
LD L, A
LD A, D
AND 7
LD B, A
INC B
LD A, 1
LOOP RRCA
DJNZ LOOP
LD B, (HL)
AND B
POP BC
POP DE
POP HL
CP 0
RET Z
LD A, 1
RET
__________________________________