Path: news.uiowa.edu!chi-news.cic.net!vixen.cso.uiuc.edu!uwm.edu!math.ohio-state.edu!pacific.mps.ohio-state.edu!freenet.columbus.oh.us!not-for-mail From: dalloff@freenet.columbus.oh.us (Dave Althoff) Newsgroups: comp.sys.apple2,comp.sys.apple2.programmer Subject: 80-col. firmware bug: help! Date: 10 Mar 1996 21:24:45 -0500 Organization: The Greater Columbus FreeNet Lines: 62 Message-ID: <4i02td$q44@acme.freenet.columbus.oh.us> NNTP-Posting-Host: acme.freenet.columbus.oh.us Summary: Someone tell me about a long-documented bug... X-Newsreader: TIN [version 1.2 PL2] Xref: news.uiowa.edu comp.sys.apple2:100313 comp.sys.apple2.programmer:6381 It's not a new bug, this one, I think, is documented... I was writing a text file display program for my ][e, which will ultimately become part of a file-browsing program for a particularly specialized application in the future, when I ran into a bug in the 80-column firmware. I'm writing and testing this program on my ROM 01 IIgs, since it runs ProDOS, and I am opposed to running that miserable OS off of floppies on the ][e. (Yes, ProDOS is miserable, particularly when you're floppy based and talking to it from BASIC.SYSTEM. But that's another issue. The project will ultimately use ProDOS, but it will also run off of a 20Mb Vulcan). Anyway, here's the problem. I use the following to write text to the screen: 30 SHOLINE LDY #$00 31 STX $25 ;POKE 37,X-reg.; X is pre-loaded 32 JSR VTAB ;Recalculate BASL/BASH 33 SHOLP1 LDA LINE,Y ;Get the next character 34 STY $24 ;POKE 36,Y-reg 35 JSR COUT ;Show the character 36 INY ;Advance 37 CPY WIDTH ;Done with this line? 38 BCC SHOLP1 ;No: Do next character (etc). Here's the problem. It all works great, except that the cursor is not repositioned to the 0th column on line 34 when Y=0. For all other (legal) values of Y, the routine works just fine. But putting a #$00 into $24 has no effect on the cursor position. This is, I think, a documented bug, and it exists on everything from the original ][e on up. I thought it might have been squashed in the enhanced //e, but its appearance on my IIgs indicates that is not the case. I vaguely remembered from typing in the "MAGIC.MENU" program many years ago (anyone remember that one? It was in the ProDOS Applesoft Programmer's Tool Kit) that there was some junk about comparing the value in PEEK(36) with some other location then POKEing location 1403. So I added between lines 34 and 35: 35 STY $057B ;Squash 80-column bug And now the program works just fine. SO...Can anyone give me a little background on this bug? Will I break something by ALWAYS writing the horizontal cursor position to that screen hole at $057B? Or do I need to remember that other location and do that compare? Is this in a technote somewhere? Can I find it on the 'Net somewhere? NOTE: My server doesn't carry c.s.a2.programmer, so if you're reading this there (I'm exploiting a "bug" in Usenet here), please include c.s.a2 in any followups. Thanks! --Dave Althoff, ][ -- /-\ _ _ __*** Closed for the season *** /XXX\ /X\ /X\_ _ /XX\_ _ _ _____ /XXXXX\ /XXX\ _/XXXX\_ /X\ /XXXXX\ /X\ /X\ /XXXXX _/XXXXXXX\__/XXXXX\/XXXXXXXX\_/XXX\_/XXXXXXX\__/XXX\_/XXX\_/\_/XXXXXX