; Title - Screen Display ; By - Adam Trionfo ; Rev - 1.0 - March 22, 2002 ; 1.1 - November 20, 2003 ; * Made compatible with HVGLIB.H ; ; This program could not have been written without using ; Mike White's "Astro BASIC 4x2 Multicart Loader" and ; and the "Nutting Manual" as a reference. ; ; ; About this Program ; ------------------ ; ; Displays eight pixels starting at $4000 (top left-hand corner). ; ; Assembling this Program ; ----------------------- ; This file will assemble with ZMAC 1.3 (a little ; known, freely distributable Z-80 assembler (with C ; source), that has a 25-year history. ZMAC can be ; compiled under just about any O.S. in existence, so ; try it out. ; ; To assemble Z-80 source code using ZMAC: ; ; zmac -i -m -o -x ; ; For example, to assemble this Astrocade Z-80 program: ; ; zmac -i -m -o 8colors.bin -x 8colors.lst 8colors.asm INCLUDE "HVGLIB.H" ; Home Video Game Library Header ORG FIRSTC ; First byte of Cartridge DB "U" ; User Cartridge Sentinel ; Menu Selection Choice #1 DW MENUST ; Next Menu Link DW PRGNAM ; Address of Program Name text DW PRGST ; Jump here if selected ORG $2007 ; Program Start PRGST: DI ; Disable interrupts SYSTEM (INTPC) ; Start System Interpreter DO (SETOUT) ; Set Display Ports DB 176D ; Vertical Blanking Line DB 1D ; Left/Right Color Boundary DB $18 ; Interrupt Mode DO (COLSET) ; Set Color Registers DW COLTAB ; Color Table DO (FILL) ; Screen Fill DW $4000 ; Destination DW 4000D ; Bytes to move DB $00 ; Fill with zeros DO (MOVE) ; Move Bytes DW $4000 ; Destination DW 2D ; Bytes to move (two) DW TOMOVE ; Source Address EXIT ; Exit System Interpreter EI ; Enable interrupts LOOP: NOP ; Endless loop JP LOOP ; End of program ; Program Data ; Color Table #1 COLTAB: DB $04 ; Color 3 Left DB $05 ; Color 2 Left DB $06 ; Color 1 Left DB $07 ; Color 0 Left - White DB $00 ; Color 3 Right - Black DB $01 ; Color 2 Right DB $02 ; Color 1 Right DB $03 ; Color 0 Right ; Program Name PRGNAM: DB 'T','E','S','T' DB $00 ; End of String ; Bytes to move TOMOVE: DB 00011011B ; Four pixels (0,1,2,3) DB 00011011B ; Four pixels (0,1,2,3) ; End of Program