!lm12
!rm75
A Note on the Underline Cursor.............Bob Sander-Cederlof

Bill Linn's "Blinking Underline Cursor" program generated a lot of interest.  However, Allan Blackburn from Fort Worth had a problem with it:

!lm+5
!rm-5
"It works just fine, until you hit RESET or re-boot...then it must be BRUN again to get it back.  You can't enter monitor and type 300G, or use CALL 768 from Applesoft.  Why doesn't calling the routine reset KSWL and KSWH?  It should, but I always end up with $9E81 there.  Even though lines 1210-1250 store $09 in $38 and $03 in $39, it seems they never get there.  Can you explain this?  Please?
!lm-5
!rm+5

Sure, Allan.  Line 1250 needs to be changed from RTS to JMP $3EA.

This is a common problem.  I had it myself back when DOS first came out.  For the first year or so we only had a tiny preliminary manual, and the subject wasn't covered.  Now the DOS manual is so large we forget to read it or where to find the information.  Look on pages 100-105 of the DOS manual and you will find a full explanation.

Briefly, here is what happens.  Lines 1210-1250 DO store the address $309 into #38 and $39.  But the next time you print a character, DOS gets control and stores its own input address right on top of yours.  DOS's input address is $9E81.

The same thing happens in Applesoft programs if you use IN#1 (for example) instead of PRINT CHR$(4)"IN#1", and then print a character.  Note 7b on page 105 tells about CALL 1002, which is $3EA.
