-
-
Save laullon/9928e27738df3c5a194d92c7b2977710 to your computer and use it in GitHub Desktop.
Amstrad CPC interrupts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |
Author
laullon
commented
Feb 17, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment