Experimenting with lcd cursor location instructions
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
; Pat80 BIOS v0.01
|
||||
; @author: Daniele Verducci
|
||||
;
|
||||
; ROM is at 0x00
|
||||
; RAM is at 0x80
|
||||
; ROM is at 0x0000
|
||||
; RAM is at 0x8000
|
||||
; SYSTEM VAR SPACE: 0x8000 - 0x8FFF (4kb)
|
||||
; DRIVERS VAR SPACE: 0x9000 - 0x9FFF (4kb)
|
||||
; APPLICATION VAR SPACE: 0xA000 - 0xFFFF (24kb)
|
||||
; LCD is at I/O 0x00 and 0x01
|
||||
|
||||
|
||||
@@ -13,6 +16,9 @@ jp sysinit ; Startup vector: DO NOT MOVE! Must be the first instruction
|
||||
; SYSTEM CONFIGURATION
|
||||
LCD_INSTR_REG: EQU %00000000
|
||||
LCD_DATA_REG: EQU %00000001
|
||||
SYS_VAR_SPACE: EQU 0x8000
|
||||
DRV_VAR_SPACE: EQU 0x9000
|
||||
APP_VAR_SPACE: EQU 0xA000
|
||||
|
||||
|
||||
; CONSTANTS
|
||||
@@ -35,12 +41,29 @@ sysinit:
|
||||
ld bc, SYSINIT_GREETING
|
||||
call lcd_print ; write string to screen
|
||||
|
||||
call lcd_locate
|
||||
|
||||
ld bc, LIPSUM
|
||||
call lcd_print
|
||||
|
||||
;call lcd_cls ; clear screen
|
||||
|
||||
;call count
|
||||
|
||||
halt
|
||||
|
||||
|
||||
; count:
|
||||
; myVar: EQU APP_VAR_SPACE ; init variable
|
||||
; ld hl, "A" ; load value into register
|
||||
; ld (myVar), hl ; copy value into variable
|
||||
; call count_loop
|
||||
|
||||
; count_loop:
|
||||
; ld bc, myVar
|
||||
; call lcd_print
|
||||
; ; increm var
|
||||
; ld a, (myVar)
|
||||
; inc a
|
||||
; ld (myVar), a
|
||||
; call count_loop
|
||||
|
||||
Reference in New Issue
Block a user