Skip to content

Instantly share code, notes, and snippets.

@laullon
Forked from neuro-sys/int.asm
Last active February 17, 2020 21:59
Show Gist options
  • Save laullon/9928e27738df3c5a194d92c7b2977710 to your computer and use it in GitHub Desktop.
Save laullon/9928e27738df3c5a194d92c7b2977710 to your computer and use it in GitHub Desktop.
Amstrad CPC interrupts
; https://gist.github.com/neuro-sys/b8bb7187540a17308bf0b3fe0a7836fd
; pasmo --cdt cpc_interrupts.asm cpc_interrupts.cdt
org &8000
start:
di
im 1
ld a, &c3
ld bc, int1
ld (&38), a
ld (&39), bc
ld bc, &7f10
out (c), c
ei
jp $
int1:
push bc
ld bc, &7f5c
out (c),c
ld bc, int2
jp int_ret
int2:
push bc
ld bc, &7f55
out (c),c
ld bc, int3
jp int_ret
int3:
push bc
ld bc, &7f4b
out (c),c
ld bc, int4
jr int_ret
int4:
push bc
ld bc, &7f4d
out (c),c
ld bc, int5
jr int_ret
int5:
push bc
ld bc, &7f56
out (c),c
ld bc, int6
jr int_ret
int6:
push bc
ld bc, &7f5f
out (c),c
ld bc, int1
jr int_ret
int_ret:
ld (&39), bc
pop bc
ei
ret
end start
@laullon
Copy link
Author

laullon commented Feb 17, 2020

49332765-aa522600-f5bb-11e8-9673-1b30a559aa4a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment