Re: A86: Date: Wed, 16 Jun 1999 16:13:27 PDT


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

Re: A86: Date: Wed, 16 Jun 1999 16:13:27 PDT



david@acz.org writes:

> I'm sure he was talking about writeback, but I'll post the code for TSR
>  anyway :)
>  
>  There seems to be a strange bug where it echos the last character printed
>  all over the screen at random, but I can't figure it out now.  After 
staring
>  at code for the last 15 hours, I need some sleep maybe...

i modifyed this code to work correctly. but i didnt find the original bug.
also it only redraws the text message about 2 times per seconds not every 
interupt

#include "ti86asm.inc"

.org _asm_exec_ram

 bit alt_int,(iy+exceptionflg)
 jp z,InstallInt
uninstall:
 res alt_int,(iy+exceptionflg)
 ret
	
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)
 inc a
 cp 100
 jp z,disp
 ld (Counter),a
 ret
disp:
; ld hl,$fc00		;if you want the top 5 rows of 
; ld de,$fc01 		; pixels cleared before the texts is displyed
; ld (hl),0			;uncomment these lines
; ld bc,16
;	ldir
; ld hl,$fc00
; ld de,$fc00+$10
; ld bc,16*5
; ldir
 ld a,0
 ld (Counter),a
 ld hl,(_penCol)
 push hl
 ld hl,50
 ld (_penCol),hl 
 ld hl,String
 in a,(5)
 push af
 ld a,$d
 out (5),a
 call _vputs
 pop af
 out (5),a
 pop hl
 ld (_penCol),hl 
 ret
String:
 .db "Matt's Ti-86 HANDS OFF!",0
Counter:
 .db 0
IntEnd:



.end

Follow-Ups: