aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/emu.c b/emu.c
index cdf113a..c482383 100644
--- a/emu.c
+++ b/emu.c
@@ -78,7 +78,10 @@ ias(unsigned short *a)
void
iap(unsigned short *a)
{
- /* TODO */
+ if (reg[IA]) {
+ mem[--reg[SP]] = reg[IA];
+ reg[IA] = *a;
+ }
cycle += 3;
}