; Title - Screen Display ; By - Adam Trionfo ; Rev - 1.1 - March 22, 2002 ; 1.2 - November 30, 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 four pixels (repeated four times) at $4000 ; (the top-left of the screen). ; The byte value displayed is $B1, which should display ; color registers 0-3, but the order displayed is ; reverse from what I expect (3-0). Why? ; ; ; 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 fourcolr.bin -x fourcolr.lst fourcolr.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 ; Program Start PRGST: DI ; Disable interrupts SYSTEM (INTPC) ; Start System Interpreter DO (SETOUT) ; Set Display Ports DB 176D ; Vertical Blanking Line DB 44D ; 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 4D ; Bytes to move (four) 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 $00 ; Color 0 Right - Black DB $5A ; Color 1 Right - Red DB $86 ; Color 2 Right - Yellow DB $F9 ; Color 3 Right - Blue DB $00 ; Color 0 Left - Black DB $5A ; Color 1 Left - Red DB $86 ; Color 2 Left - Yellow DB $F9 ; Color 3 Left - Blue ; 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) DB 00011011B ; Four pixels (0,1,2,3) DB 00011011B ; Four pixels (0,1,2,3) ; End of Program