2023-10-26 19:51:20 +02:00
|
|
|
;********************************************************************************
|
|
|
|
; @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
|
2023-10-28 03:48:27 +02:00
|
|
|
; 0202-02ff keybuffer
|
2023-10-26 19:51:20 +02:00
|
|
|
; 0300 lcd character counter
|
|
|
|
; 0400, 0401, 0402 dht status, dht bit, dht_bit_rot
|
|
|
|
; 0403 value offset
|
2023-10-28 03:48:27 +02:00
|
|
|
; 0405-04a0 rh high/low, temp high/low, checksum
|
2023-10-26 19:51:20 +02:00
|
|
|
|
2023-11-11 12:12:03 +01:00
|
|
|
.include "io_W65C22.h65"
|
|
|
|
.include "utility.h65"
|
|
|
|
|
2023-10-26 19:51:20 +02:00
|
|
|
; ARGUMENTS
|
|
|
|
; a,x,y can also be used
|
2023-11-11 12:12:03 +01:00
|
|
|
.segment "ZEROPAGE"
|
|
|
|
ARG0: .res 1
|
|
|
|
ARG1: .res 1
|
|
|
|
ARG2: .res 1
|
|
|
|
ARG3: .res 1
|
|
|
|
ARG4: .res 1
|
|
|
|
ARG5: .res 1
|
|
|
|
ARG6: .res 1
|
|
|
|
ARG7: .res 1
|
|
|
|
ARG9: .res 1
|
|
|
|
ARG10: .res 1
|
|
|
|
ARG11: .res 1
|
|
|
|
ARG12: .res 1
|
|
|
|
ARG13: .res 1
|
|
|
|
ARG14: .res 1
|
|
|
|
ARG15: .res 1
|
2023-10-26 19:51:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
; RETURN VALUE
|
|
|
|
; in a
|
|
|
|
|
2023-11-11 12:12:03 +01:00
|
|
|
.segment "VIA1"
|
|
|
|
; IO1: .res 16
|
2023-10-26 19:51:20 +02:00
|
|
|
IO1 = $6000
|
2023-11-11 12:12:03 +01:00
|
|
|
|
|
|
|
.segment "VIA2"
|
|
|
|
; IO2: .res 16
|
2023-10-26 19:51:20 +02:00
|
|
|
IO2 = $7000
|
|
|
|
|
|
|
|
; struct method
|
2023-10-27 16:50:58 +02:00
|
|
|
; .org $6000
|
|
|
|
; VIA1: .tag VIA_Pins
|
|
|
|
; .org $7000
|
|
|
|
; VIA2: .tag VIA_Pins
|
2023-10-26 19:51:20 +02:00
|
|
|
|
2023-10-27 16:50:58 +02:00
|
|
|
; ; 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
|
2023-10-26 19:51:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
.endif ; include guard
|