6502-OS/system/system.h65

85 lines
1.8 KiB
Plaintext
Raw Normal View History

2024-08-08 20:39:25 +02:00
;;********************************************************************************
2024-08-08 21:11:25 +02:00
;; @file
;; @brief System header
2024-08-08 20:39:25 +02:00
;; @ingroup system
;; @details
2024-08-08 21:11:25 +02:00
;; Variables for the current hardware setup
2024-08-08 20:39:25 +02:00
;;********************************************************************************
2023-12-08 22:56:35 +01:00
.ifndef INCLUDE_SYSTEM
INCLUDE_SYSTEM = 1
2023-12-27 16:55:56 +01:00
2024-08-08 20:39:25 +02:00
;;********************************************************************************
;; @page system_stuff More System stuff
;; @subsubsection ram_reserved Reserved RAM addresses
;; - 00-0f - free use (Z0-Z15)
;; - 10-1f - arguments / return values (ARG0-ARG15)
;; - 20-ff - free
;; - 0100 - 01FF Stack
;; - 0200,0201 keypad keybuffer write/read pointer
;; - 0202-02ff keypad keybuffer
;; - 0300 lcd character counter
;; @ingroup system
;;********************************************************************************
2023-12-08 22:56:35 +01:00
.include "io_W65C22.h65"
.include "utility.h65"
2023-12-27 16:55:56 +01:00
.importzp Z0,Z1,Z2,Z3,Z4,Z5,Z6,Z7,Z8,Z9,Z10,Z11,Z12,Z13,Z14,Z15
.importzp ARG0,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8,ARG9,ARG10,ARG11,ARG12,ARG13,ARG14,ARG15
2023-12-08 22:56:35 +01:00
2023-12-27 16:55:56 +01:00
; Z0 = $0
; Z1 = $1
; Z2 = $2
; Z3 = $3
; Z4 = $4
; Z5 = $5
; Z6 = $6
; Z7 = $7
; Z8 = $8
; Z9 = $9
; Z10 = $a
; Z11 = $b
; Z12 = $c
; Z13 = $d
; Z14 = $e
; Z15 = $f
; ; ARGUMENTS
; ; a,x,y can also be used
; ARG0 = $10
; ARG1 = $11
; ARG2 = $12
; ARG3 = $13
; ARG4 = $14
; ARG5 = $15
; ARG6 = $16
; ARG7 = $17
; ARG8 = $18
; ARG9 = $19
; ARG10 = $1a
; ARG11 = $1b
; ARG12 = $1c
; ARG13 = $1d
; ARG14 = $1e
; ARG15 = $1f
2023-12-08 22:56:35 +01:00
; RETURN VALUE
.segment "VIA1"
; IO1: .res 16
IO1 = $6000
.segment "VIA2"
; IO2: .res 16
IO2 = $7000
2023-12-31 01:59:06 +01:00
; charmappings for the lcd
; .charmap 'ü', $F5
; .charmap 'Ü', $F5
; .charmap 'ö', $EF
; .charmap 'Ö', $EF
; .charmap 'ä', $E1
; .charmap 'Ä', $E1
; .charmap 'ß', $E2
2023-12-08 22:56:35 +01:00
.endif ; include guard