83 lines
1.5 KiB
Plaintext
83 lines
1.5 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
|
|
; 0400, 0401, 0402 dht status, dht bit, dht_bit_rot
|
|
; 0403 value offset
|
|
; 0405-04a0 rh high/low, temp high/low, checksum
|
|
|
|
.include "io_W65C22.h65"
|
|
.include "utility.h65"
|
|
|
|
; ARGUMENTS
|
|
; a,x,y can also be used
|
|
.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
|
|
|
|
|
|
; RETURN VALUE
|
|
; in a
|
|
|
|
.segment "VIA1"
|
|
; IO1: .res 16
|
|
IO1 = $6000
|
|
|
|
.segment "VIA2"
|
|
; IO2: .res 16
|
|
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
|