A86: accessing video mem and strings during an interupt


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

A86: accessing video mem and strings during an interupt




i have a string on my calc called "data" it is 1024 bytes. it contains a 
picture i want to display as a background
this is my code
it is the same interupt template that david phillips posted a while ago 
the template works the problem is at the InsStart label

#include "ti86asm.inc"

.org _asm_exec_ram

InstallInt:
 ld hl,IntHandler
 ld de,_alt_interrupt_exec
 push de
 ld bc,IntEnd-IntStart
 ldir
 ld de,$28
 pop hl
 ld a,(hl)
 dec hl
 push hl
 ld b,5
CalcChecksum:
 add hl,de
 add a,(hl)
 djnz CalcChecksum
 pop hl
 ld (hl),a
 set alt_int,(iy+exceptionflg)
 ret

IntHandler:
 .org _alt_interrupt_exec
IntStart:
	ld a,(counter)
	cp 100
	jp z,showtime
	inc a
	ld (counter),a
	ret
showtime:
	xor a
	ld (counter),a
	ld hl,varname-1
	rst 20h
	rst 10h
	ret c
	ld a,b
	ex de,hl
	call _SET_ABS_SRC_ADDR
	xor a
	ld hl,$fc00
	call _SET_ABS_DEST_ADDR
	xor a
	ld hl,1024
	call _SET_MM_NUM_BYTES
	call _mm_ldir
	ret

varname:
	.db 4,"data"

counter:
	.db 0
IntEnd: