A86: Re: Interesting problem


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

A86: Re: Interesting problem



you are going in an infinite loop there; try:
 
 ld bc,$0400
 ld hl,$FC00 
bob: 
 ld (hl),<value> 
 inc hl 
 dec bc
 ld a,b 
 or c 
 jr nz,bob 
 ret 
 
-----Original Message-----
From: Mark Lippmann <kifyre@megsinet.net>
To: asm86 <assembly-86@lists.ticalc.org>
Date: Saturday, February 07, 1998 6:15 PM
Subject: A86: Interesting problem

Here's the deal. The following code displays a pattern on the screen and then freezes the calc. (I'm using the emulator so it doesn't really matter.) What's strange is that when I load $FF into A, the program works fine, displaying a solid black LCD. When I load "1111000" into A, the emulator brings me back to the dos box. I'm not sure what would happen on the actual calc.
------------------------------
#include "ti86asm.inc"
 
.org _asm_exec_ram
 
 ld hl,$FC00
 ld a,---either %11110000 or $FF goes here---
 ld b,a
bob:
 ld (hl),b
 inc hl
 jp bob
 
.end
------------------------
Can someone explain why this happens? The emulator quite willingly freezes when you do something stupid, but to my knowledge it doesn't crash. Why would changing this one value cause the problem?
 
Mark L.