A86: Interrupts...


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

A86: Interrupts...



Hello,
	I haven't really been following the sqrt key discussion, but I attempted
to make a simple program that uses interrupts.. can someone tell me why the
heck this doesn't work?!?  Thank You.
								-Ahmed
#include "asm86.h"
#include "ti86asm.inc"

_user_int_ram EQU $d2fd

.org _asm_exec_ram

Start:

   res 2,(iy+$23)    ;turn user int off so it won't get called by
                     ;accident before we're ready
   ld hl,code        ;copy prog to user int buffer
   ld de,_user_int_ram+1
   ld bc,code_end-code
   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
	

code:
	push af
	push hl
	push bc
	call $46bb
	call $4a33
	call _getkey
	pop af
	pop hl
	pop bc

code_end:

.end
END

Ahmed El-Helw
ahmedre@worldnet.att.net
http://home.att.net/~ahmedre
ICQ: 3350394

Follow-Ups: References: