A86: more interupt probs


[Prev][Next][Index][Thread]

A86: more interupt probs




below is program that i edited in a feeble attempt to shut off the calc
on the press of EXIT, i am still getting errors, this time it was an
overflow. any ideas?

#include "asm86.h"
#include "ti86asm.inc"

_user_int_ram EQU $d2fd

.org _asm_exec_ram
   res 2,(iy+$23)    ;turn user int off so it won't get called by
                     ;accident before we're ready
   
   ld hl,int         ;copy prog to user int buffer
   ld de,_user_int_ram+1
   ld bc,int_end-int
   ldir
   
   ld a,(_user_int_ram+1)  ;set up checksum byte
   ld hl,_user_int_ram+($28*1)
   add a,(hl)
   ld hl,_user_int_ram+($28*2)
   add a,(hl)
   ld hl,_user_int_ram+($28*3)
   add a,(hl)
   ld hl,_user_int_ram+($28*4)
   add a,(hl)
   ld hl,_user_int_ram+($28*5)
   add a,(hl)
   ld (_user_int_ram),a

   set 2,(iy+$23)    ;turn it on
   ret

int:
   call $5371
   cp $37
   jp nz,i0
   call $0C29 
i0: ld (var),hl

   ret

var equ $-int+_user_int_ram+1
   .dw $fc00
int_end:

.end


Follow-Ups: