; hello demonstration for the G7000 by Soeren Gust ; Version 1.1 ; ; History: ; Version 1.1 ; more symbolic names from g7000.h ; ; Version 1.0 ; first release ; ; This program simply prints "HELLO WORLD" on the screen using tables. ; Copyright (C) 1997 by Soeren Gust, sgust@ithh.informationstheater.de ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ; You can always get the latest version at http://soeren.informationstheater.de cpu 8048 org 400h include "g7000.h" jmp selectgame ; RESET jmp irq ; interrupt jmp timer ; timer jmp vsyncirq ; VSYNC-interrupt jmp start ; after selectgame jmp soundirq ; sound-interrupt timer retr ; we don't need timer start call gfxon ; no need to turn gfx off call extramenable ; the table is in extram mov r0,#07fh ; begin of table mov a,#02ch ; 4 bytes / char * 0bh = length movx @r0,a ; into table dec r0 ; next byte in table mov a,#vdc_char0 movx @r0,a ; into table dec r0 ; next byte in table mov r3,#20h ; x-position mov r4,#20h ; y-position mov r2,#0bh ; length mov r1,#hellostr & 0ffh ; the string to print, must be in the same page loop mov a,r1 ; get pointer movp a,@a ; get char mov r5,a ; into the right register inc r1 ; advance pointer mov r6,#col_chr_green call tableprintchar ; put it into table djnz r2,loop ; do it again call tableend ; activate the table stop jmp stop ; Thats all hellostr db 1dh, 12h, 0eh, 0eh, 17h, 0ch, 11h, 17h, 13h, 0eh, 1ah