37 lines
787 B
NASM
37 lines
787 B
NASM
PORTD equ 08h
|
|
DDRD equ 09h
|
|
TOC1 equ 16h
|
|
SPCR equ 28h
|
|
BAUD equ 2Bh
|
|
SCCR1 equ 2Ch
|
|
SCCR2 equ 2Dh
|
|
SCSR equ 2Eh
|
|
SCDAT equ 2Fh
|
|
PPROG equ 3Bh
|
|
CONFIG equ 3Fh
|
|
|
|
EEPSTR equ 0B600h ; start of EEPROM
|
|
EEPEND equ 0B7FFh ; end of EEPROM
|
|
RAMSTR equ 00000h
|
|
RAMEND equ 001FFh
|
|
DELAYS equ 3504 ; delay at slow baud
|
|
DELAYF equ 539 ; delay at fast baud
|
|
|
|
there:
|
|
bcc ERASE
|
|
; bcc there ; ok
|
|
; staa ix,ERASE ; needs another pass to resolve forward reference
|
|
; HERE equ * ; ok
|
|
; staa ix,SCDAT ; ok
|
|
; rts ; return to caller
|
|
ERASE equ * ; ERASE procedure
|
|
bset ix,PPROG+08h,20h ; this generates incorrect code
|
|
; bset ix,SPCR,20h ; put port D in wire or mode
|
|
rts ; return to caller
|
|
|
|
|
|
|
|
|
|
|
|
|