[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

To TURN ON the Z-80 and TURN OFF the 6510 chip, type in the following program:

 10 REM THIS PROGRAM IS TO BE USED WITH THE Z80 CARD
 20 REM IT FIRST STORES Z80 DATA AT $1000 (Z80=$0000)
 30 REM THEN IT TURNS OFF THE 6510 IRQ'S AND ENABLES
 40 REM THE Z80 CARD. THE Z80 CARD MUST BE TURNED OFF
 50 REM TO REENABLE THE 6510 SYSTEM.
 100 REM STORE Z80 DATA
 110 READ B: REM GET SIZE OF Z80 CODE TO BE MOVED
 120 FOR I=4096 TO 4096+B-1:REM MOVE CODE
 130 READ A:POKE I,A
 140 NEXT I
 200 REM RUN Z80 CODE
 210 POKE 56333,127: REM TURN OF 6510 IRQ'S
 220 POKE 56832,00 : REM TURN ON Z80 CARD
 230 POKE 56333,129: REM TURN ON 6510 IRQ'S WHEN Z80 DONE
 240 END
 1000 REM Z80 MACHINE LANGUAGE CODE DATA SECTION
 1010 DATA 18 : REM SIZE OF DATA TO BE PASSED
 1100 REM Z80 TURN ON CODE
 1110 DATA 00,00,00 : REM OUR Z80 CARD REQUIRES TURN ON TIME AT $0000
 1200 REM Z80 TASK DATA HERE
 1210 DATA 33,02,245: REM LD HL,NN (LOCATION ON SCREEN)
 1220 DATA 52 : REM INC HL (INCREMENT THAT LOCATION)
 1300 REM Z80 SELF-TURN OFF DATA HERE
 1310 DATA 62,01 : REM LD A,N
 1320 DATA 50,00,206 : REM LD (NN),A :I/O LOCATION
 1330 DATA 00,00,00  : REM NOP, NOP, NOP
 1340 DATA 195,00,00 : REM JMP $0000

For more details about Commodore CP/M® and the Z-80 microprocessor look for the cartridge and the Z-80 Reference Guide at your local Commodore computer dealer.


[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated July 25, 1998.