79 lines
1.4 KiB
Plaintext
79 lines
1.4 KiB
Plaintext
|
;********************************************************************************
|
||
|
; @module system
|
||
|
; @type header
|
||
|
; @details
|
||
|
; Variable definitions for the current hardware setup
|
||
|
;********************************************************************************
|
||
|
|
||
|
.ifndef INCLUDE_SYSTEM
|
||
|
INCLUDE_SYSTEM = 1
|
||
|
; reserved RAM addresses
|
||
|
; 00-0f - free
|
||
|
; 10-1f - arguments / return values
|
||
|
; 20-ff - free
|
||
|
; 0100 - 01FF Stack
|
||
|
; 0200,0201 keybuffer write/read pointer
|
||
|
; 0202 - 02ff keybuffer
|
||
|
; 0300 lcd character counter
|
||
|
; 0301 - 0341 message to print
|
||
|
; 0400, 0401, 0402 dht status, dht bit, dht_bit_rot
|
||
|
; 0403 value offset
|
||
|
; 0405 - 04a0 rh high/low, temp high/low, checksum
|
||
|
|
||
|
TO_PRINT = $300
|
||
|
|
||
|
; ARGUMENTS
|
||
|
; a,x,y can also be used
|
||
|
ARG0 = $10
|
||
|
ARG1 = $11
|
||
|
ARG2 = $12
|
||
|
ARG3 = $13
|
||
|
ARG4 = $14
|
||
|
ARG5 = $15
|
||
|
ARG6 = $16
|
||
|
ARG7 = $17
|
||
|
ARG9 = $19
|
||
|
ARG10 = $1a
|
||
|
ARG11 = $1b
|
||
|
ARG12 = $1c
|
||
|
ARG13 = $1d
|
||
|
ARG14 = $1e
|
||
|
ARG15 = $1f
|
||
|
|
||
|
.include "io_W65C22.asm6502"
|
||
|
.include "utility.asm6502"
|
||
|
|
||
|
; RETURN VALUE
|
||
|
; in a
|
||
|
|
||
|
IO1 = $6000
|
||
|
IO2 = $7000
|
||
|
|
||
|
; struct method
|
||
|
.org $6000
|
||
|
VIA1: .tag VIA_Pins
|
||
|
.org $7000
|
||
|
VIA2: .tag VIA_Pins
|
||
|
|
||
|
; IO-1
|
||
|
PB1 = $6000
|
||
|
PA1 = $6001
|
||
|
DDRB1 = $6002
|
||
|
DDRA1 = $6003
|
||
|
T1L1 = $6004
|
||
|
T1H1 = $6005
|
||
|
; IO-2
|
||
|
PB2 = $7000
|
||
|
PA2 = $7001
|
||
|
DDRB2 = $7002
|
||
|
DDRA2 = $7003
|
||
|
T1L2 = $7004
|
||
|
T1H2 = $7005
|
||
|
ACR2 = $700b
|
||
|
PCR2 = $700c
|
||
|
IFR2 = $700d
|
||
|
IER2 = $700e
|
||
|
|
||
|
|
||
|
.endif ; include guard
|