Skip to content

Instantly share code, notes, and snippets.

@cypok
Forked from NIA/timer5.asm
Created May 12, 2010 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cypok/398415 to your computer and use it in GitHub Desktop.
Save cypok/398415 to your computer and use it in GitHub Desktop.
.warmst equ $ff7c
tcnt equ $100e
tctl1 equ $1020
tctl2 equ $1021
tic1 equ $1010
toc2 equ $1018
tflg1 equ $1023
cforc equ $100b
adctl equ $1030
adr1 equ $1031
adr4 equ $1034
eot equ $04
org $100
ldaa #%00010001
staa tctl2
ldaa #%00000100
staa tflg1
ldaa #%01000000
staa tflg1
ldaa #%00100000
staa tflg1
ldaa #%01000000
staa tctl1
ldaa #$21
staa adctl
ldaa #$93
staa $1039
test
ldaa tflg1
bita #%00000100
bne oprn
ldaa tflg1
bita #%01000000
bne small
bra test
oprn
ldaa #%00000100
staa tflg1
ldaa #%01000000
staa tflg1
ldd tic1
subd last
lsrd
lsrd
lsrd
lsrd
std period
ldab adr1
clra
subd #$80
std delta
ldd tic1
addd period
addd delta
std toc2
ldd tic1
std last
bra test
small
ldd toc2
addd period
subd delta
std toc2
ldaa #%01000000
staa tflg1
big ldaa tflg1
bita #%01000000
beq big
ldab adr1
clra
subd #$80
std delta
ldd toc2
addd period
addd delta
std toc2
ldaa #%01000000
staa tflg1
jmp test
last fdb 0
period fdb 0
delta fdb 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment