Programming - as in the game programs to record records, status on the disc.

Power #05
                 Hacker tips for beginners


(C) T.A.W. / JUPITER 77


   Hello Young Hacker! It's me again T.A.W. and this time I
tell you (in a live example) as in game programs do
account records, and status (but never do so shipment status in 
the games genre ADVENTURE) to disk. 

   As an example, consider a game made by ACE CASCADE
GAMES in 1986.

   It is a procedure for shipment of records from the address 
35501, and boot from the addresses of 30,963. Length of 160 
bytes of paged unit. 


   And now I present assembly code of the new procedures save /
working without load system variables.

   Tagged Under DRIVER driver itself will work with the disk 
and which can be used for any purpose.



        ORG 65319

        LD HL, 35000

        LD B, 1

        CALL DRIVER

        LD IX, 23296

        JP 30716

DRIVER DI

        LD DE, 0

        LD IX, # 2F65

        CALL DOS
L_06 PUSH BC

        LD C, D

        SRL C
DRV LD A, 0

        JR NC, L_01

        OR # 2C

        JR L_02
L_01 OR # 3C
L_02 LD IX, # 2F4D

        CALL DOS

        POP BC
L_05 PUSH DE

        PUSH BC

        LD IX, # 2F1B

        BIT O, C

        JR NZ, L_03

        LD IX, # 2D73
L_03 CALL DOS

        POP BC

        POP DE

        INC H

        INC E

        BIT 4, E

        JR NZ, L_04

        DJNZ L_05

        JR EXIT
L_04 LD E, 0

        INC D

        DJNZ L_06
EXIT EI

        RET
DOS PUSH IX

        JP # 3D2F

        DEFM "THIS DISK DRIVER WRITTEN BY CHAOS A.D."


   In the main block game using STS put at SAVE
/ 35 501 /:


   LD C, 6

   JP 65319

 and to the address LOAD / 30 963 /:


   LD C, 5

   JP 65319


   At (DRIVER +2), store the variables from the 23796/97, and on
address (DRV +1), store the variable of 23,798. But it's done
after downloading the program, which will have the form

BASIC -???
CODES1-acec1, 23296,256
CODES2-acec2, 25000,40535
CODES3-record, 35000,256 / write out of the game in STS'e /

After downloading CODES2 vyshenapisannuyu follow the 
instructions. 


   I hope that now you will be able to freely make such
things in programs.

   The annex will include:

1) assembly code for assembler DRIVER ALASM.
2) Game NIGEL MANSEL'S GRAND PRIX (tailor with this driver).
3) Tape version of the game ACE 1.

   To contact the editorial office POWER.