Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #3940 > unrolled thread
| Started by | Bill Chatfield <billchatfield1@gmail.com> |
|---|---|
| First post | 2017-10-09 21:47 -0700 |
| Last post | 2017-10-12 21:30 -0700 |
| Articles | 20 on this page of 33 — 10 participants |
Back to article view | Back to comp.sys.apple2.programmer
Delete Key Handler for BASIC.SYSTEM Bill Chatfield <billchatfield1@gmail.com> - 2017-10-09 21:47 -0700
Re: Delete Key Handler for BASIC.SYSTEM James Davis <JPD.Enterprises@outlook.com> - 2017-10-09 22:57 -0700
Re: Delete Key Handler for BASIC.SYSTEM James Davis <JPD.Enterprises@outlook.com> - 2017-10-09 23:47 -0700
Re: Delete Key Handler for BASIC.SYSTEM "Mark D. Overholser" <marko@markoverholser.com> - 2017-10-10 09:57 -0700
Re: Delete Key Handler for BASIC.SYSTEM Steve Nickolas <usotsuki@buric.co> - 2017-10-10 12:59 -0400
Re: Delete Key Handler for BASIC.SYSTEM Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2017-10-12 00:59 -0500
Re: Delete Key Handler for BASIC.SYSTEM Bill Chatfield <billchatfield1@gmail.com> - 2017-10-10 21:02 -0700
Re: Delete Key Handler for BASIC.SYSTEM James Davis <JPD.Enterprises@outlook.com> - 2017-10-11 00:36 -0700
Re: Delete Key Handler for BASIC.SYSTEM Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2017-10-12 00:53 -0500
Re: Delete Key Handler for BASIC.SYSTEM James Davis <JPD.Enterprises@outlook.com> - 2017-10-12 00:37 -0700
Re: Delete Key Handler for BASIC.SYSTEM mdj <mdj.mdj@gmail.com> - 2017-11-21 19:05 -0800
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-09 23:46 -0700
Re: Delete Key Handler for BASIC.SYSTEM "Mark D. Overholser" <marko@markoverholser.com> - 2017-10-10 09:59 -0700
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-10 21:02 -0700
Re: Delete Key Handler for BASIC.SYSTEM Bill Chatfield <billchatfield1@gmail.com> - 2017-10-10 21:21 -0700
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-11 07:56 -0700
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-11 08:02 -0700
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-11 08:15 -0700
Re: Delete Key Handler for BASIC.SYSTEM James Davis <JPD.Enterprises@outlook.com> - 2017-10-11 17:50 -0700
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-11 20:42 -0700
Re: Delete Key Handler for BASIC.SYSTEM James Davis <JPD.Enterprises@outlook.com> - 2017-10-12 00:09 -0700
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-12 07:42 -0700
Re: Delete Key Handler for BASIC.SYSTEM James Davis <JPD.Enterprises@outlook.com> - 2017-10-12 22:42 -0700
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-13 13:14 -0700
Re: Delete Key Handler for BASIC.SYSTEM Bill Chatfield <billchatfield1@gmail.com> - 2017-10-13 22:16 -0700
Re: Delete Key Handler for BASIC.SYSTEM Michael Pohoreski <michael.pohoreski@gmail.com> - 2017-10-14 09:58 -0700
Re: Delete Key Handler for BASIC.SYSTEM Michael J. Mahon <mjmahon@aol.com> - 2017-10-14 17:17 -0500
Re: Delete Key Handler for BASIC.SYSTEM Michael Pohoreski <michael.pohoreski@gmail.com> - 2017-10-14 22:44 -0700
Re: Delete Key Handler for BASIC.SYSTEM Michael J. Mahon <mjmahon@aol.com> - 2017-10-15 02:04 -0500
Re: Delete Key Handler for BASIC.SYSTEM Anthony Ortiz <anthonypaulo@gmail.com> - 2017-10-15 08:22 -0700
Re: Delete Key Handler for BASIC.SYSTEM Michael Pohoreski <michael.pohoreski@gmail.com> - 2017-10-16 09:43 -0700
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-16 13:19 -0700
Re: Delete Key Handler for BASIC.SYSTEM gids.rs@sasktel.net - 2017-10-12 21:30 -0700
Page 1 of 2 [1] 2 Next page →
| From | Bill Chatfield <billchatfield1@gmail.com> |
|---|---|
| Date | 2017-10-09 21:47 -0700 |
| Subject | Delete Key Handler for BASIC.SYSTEM |
| Message-ID | <de32a087-4159-4df3-9420-9f8c80670cbf@googlegroups.com> |
It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it. https://github.com/gungwald/delhndlr It assembles with Merlin.
[toc] | [next] | [standalone]
| From | James Davis <JPD.Enterprises@outlook.com> |
|---|---|
| Date | 2017-10-09 22:57 -0700 |
| Message-ID | <df5adaa7-de7f-48ce-be9e-761a542be546@googlegroups.com> |
| In reply to | #3940 |
On Monday, October 9, 2017 at 9:48:00 PM UTC-7, Bill Chatfield wrote: > It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it. > > https://github.com/gungwald/delhndlr > > It assembles with Merlin. It is not really a DELETE key. It operates like a BACKSPACE key and occupies the same keyboard space as BACKSPACE keys do on more modern keyboards. An easier fix is to make a new label for it!
[toc] | [prev] | [next] | [standalone]
| From | James Davis <JPD.Enterprises@outlook.com> |
|---|---|
| Date | 2017-10-09 23:47 -0700 |
| Message-ID | <a0661d0f-ff21-4145-8441-34425da50747@googlegroups.com> |
| In reply to | #3941 |
P.S. It is annoying though! And, it would be nice if it operated like the DELETE key on modern PC systems. But, then you still need a BACKSPACE key that operates like the Apple II DELETE key does. This is one of those things that would be easy to change in an emulator, to get rid of the annoyance and the backwardness of the Apple II keyboard, but hard to do on real hardware and firmware.
[toc] | [prev] | [next] | [standalone]
| From | "Mark D. Overholser" <marko@markoverholser.com> |
|---|---|
| Date | 2017-10-10 09:57 -0700 |
| Message-ID | <b6bf4929-bf71-e780-e75e-55081088e03b@markoverholser.com> |
| In reply to | #3943 |
On 09-Oct-17 23:47, James Davis wrote: > P.S. It is annoying though! And, it would be nice if it operated > like the DELETE key on modern PC systems. But, then you still need a > BACKSPACE key that operates like the Apple II DELETE key does. > > This is one of those things that would be easy to change in an > emulator, to get rid of the annoyance and the backwardness of the > Apple II keyboard, but hard to do on real hardware and firmware. > Use the Open Apple or Closed Apple as a Modifier.. The Shift Key could have been used, if it was Detectable... For consistency with modern Keyboards, have it Default to the BackSpace ( Ctrl-H ), and when the Open Apple or Close Apple is held Down, have it "shift" to Delete... MarkO
[toc] | [prev] | [next] | [standalone]
| From | Steve Nickolas <usotsuki@buric.co> |
|---|---|
| Date | 2017-10-10 12:59 -0400 |
| Message-ID | <alpine.BSF.2.02.1710101258370.83617@frieza.hoshinet.org> |
| In reply to | #3943 |
On Mon, 9 Oct 2017, James Davis wrote: > P.S. It is annoying though! And, it would be nice if it operated like > the DELETE key on modern PC systems. But, then you still need a > BACKSPACE key that operates like the Apple II DELETE key does. > > This is one of those things that would be easy to change in an emulator, > to get rid of the annoyance and the backwardness of the Apple II > keyboard, but hard to do on real hardware and firmware. > And indeed most emulators I've used map BkSp to <-, putting Delete on Del if it's actually needed. -uso.
[toc] | [prev] | [next] | [standalone]
| From | Brian Patrie <bpatrie@bellsouth.spamisicky.net> |
|---|---|
| Date | 2017-10-12 00:59 -0500 |
| Message-ID | <orn0cg$10i7$1@gioia.aioe.org> |
| In reply to | #3945 |
On 2017-10-10 11:59, Steve Nickolas wrote: > And indeed most emulators I've used map BkSp to <-, putting Delete on > Del if it's actually needed. AppleWin is one of these. I wish i could disable the feature; it's a bit annoying in environments where it behaves properly.
[toc] | [prev] | [next] | [standalone]
| From | Bill Chatfield <billchatfield1@gmail.com> |
|---|---|
| Date | 2017-10-10 21:02 -0700 |
| Message-ID | <28409753-da30-4c32-9f81-728b431f576f@googlegroups.com> |
| In reply to | #3941 |
On Tuesday, October 10, 2017 at 1:57:20 AM UTC-4, James Davis wrote: > On Monday, October 9, 2017 at 9:48:00 PM UTC-7, Bill Chatfield wrote: > > It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it. > > > > https://github.com/gungwald/delhndlr > > > > It assembles with Merlin. > > It is not really a DELETE key. It operates like a BACKSPACE key and occupies the same keyboard space as BACKSPACE keys do on more modern keyboards. An easier fix is to make a new label for it! Not on real hardware. In BASIC.SYSTEM or in DOS 3.3 it doesn't operate like a Backspace. It just displays a weird character. Your emulator may be mapping it to a left arrow. But on real hardware it doesn't do that. That's why I wrote this, to make it work like a Backspace. It's in the keyboard position that a Backspace key should be in, so it needs to work like a Backspace.
[toc] | [prev] | [next] | [standalone]
| From | James Davis <JPD.Enterprises@outlook.com> |
|---|---|
| Date | 2017-10-11 00:36 -0700 |
| Message-ID | <b1a728a1-d181-4789-b28a-d10aa3c5b167@googlegroups.com> |
| In reply to | #3947 |
On Tuesday, October 10, 2017 at 9:02:17 PM UTC-7, Bill Chatfield wrote:
> On Tuesday, October 10, 2017 at 1:57:20 AM UTC-4, James Davis wrote:
> > On Monday, October 9, 2017 at 9:48:00 PM UTC-7, Bill Chatfield wrote:
> > > It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it.
> > >
> > > https://github.com/gungwald/delhndlr
> > >
> > > It assembles with Merlin.
> >
> > It is not really a DELETE key. It operates like a BACKSPACE key and occupies the same keyboard space as BACKSPACE keys do on more modern keyboards. An easier fix is to make a new label for it!
>
> Not on real hardware. In BASIC.SYSTEM or in DOS 3.3 it doesn't operate like a Backspace. It just displays a weird character. Your emulator may be mapping it to a left arrow. But on real hardware it doesn't do that. That's why I wrote this, to make it work like a Backspace. It's in the keyboard position that a Backspace key should be in, so it needs to work like a Backspace.
Yeah, I was testing it on my real Enhanced Apple IIe to understand what you were saying about the Delete key, but I was using it from within programs like AppleWorks and ProDOS to change Prefixes. In the Monitor and in BASIC it prints a checkerboard character. In programs' "line input routines" it acts like a Backspace key. That's why I said what I said (e.g., Re-Label it!).
In some programs I have used, you can make it work like a real Delete key by pressing a modifier key with it (e.g., Control, Open-Apple, or Solid-Apple, plus Delete). I suggest that you do something like that too. Then, Re-Label your Delete key: Delete/{Modifier Key Name}-Backspace! [I like Ctrl-Backspace; allows using your two little fingers.]
You could do something similar with the left and right arrow keys to make them function like Backspace (<--) and Delete (-->) keys, too (instead of as cursor movement or "type over" keys).
[toc] | [prev] | [next] | [standalone]
| From | Brian Patrie <bpatrie@bellsouth.spamisicky.net> |
|---|---|
| Date | 2017-10-12 00:53 -0500 |
| Message-ID | <orn004$vvk$1@gioia.aioe.org> |
| In reply to | #3941 |
On 2017-10-10 00:57, James Davis wrote: > It is not really a DELETE key. It operates like a BACKSPACE key and occupies the same keyboard space as BACKSPACE keys do on more modern keyboards. An easier fix is to make a new label for it! At the risk of being pedantic: Does it not delete (when properly implemented--as in the likes of AppleWorks, or ProgramWriter)? You've gotten used to a nomenclature that descends from typewriters--which, of course, do not delete. A more properly descriptive name for the intended function of this key is delete-to-left. The IBMoid PC Delete key is, of course, delete-to-right. FWIW: The Apple II delete key sends an ASCII rubout character. And the left-arrow key sends backspace.
[toc] | [prev] | [next] | [standalone]
| From | James Davis <JPD.Enterprises@outlook.com> |
|---|---|
| Date | 2017-10-12 00:37 -0700 |
| Message-ID | <175ed59b-5a2c-4c1a-9e10-f05952e7a3ff@googlegroups.com> |
| In reply to | #3956 |
On Wednesday, October 11, 2017 at 10:53:09 PM UTC-7, Brian Patrie wrote: > On 2017-10-10 00:57, James Davis wrote: > > It is not really a DELETE key. It operates like a BACKSPACE key and occupies the same keyboard space as BACKSPACE keys do on more modern keyboards. An easier fix is to make a new label for it! > > At the risk of being pedantic: > > Does it not delete (when properly implemented--as in the likes of > AppleWorks, or ProgramWriter)? You've gotten used to a nomenclature > that descends from typewriters--which, of course, do not delete. A more > properly descriptive name for the intended function of this key is > delete-to-left. The IBMoid PC Delete key is, of course, delete-to-right. > > FWIW: The Apple II delete key sends an ASCII rubout character. > And the left-arrow key sends backspace. OK, I am going on common usage of IBM-PC 101-key keyboards and not the Apple IIe keyboard for my descriptions of function for the DELETE key and BACKSPACE key. And, yes, the DELETE key does delete when properly implemented, but it is totally backward from what I am currently used to. I don't remember whether the typewriters I learned to type on in high-school (ca. 1967~1968) had a DELETE key or not--I don't think so, that feature came later with the IBM Selectrics--but I am pretty sure those typewriters had a backspace key (somewhere on them, not necessarily where the backspace key is on modern keyboards) that operated like a left-arrow so you could type-over what you backed-up over. On the Selectrics, it would white-out (from the ribbon) what you backed-up over as you did it.
[toc] | [prev] | [next] | [standalone]
| From | mdj <mdj.mdj@gmail.com> |
|---|---|
| Date | 2017-11-21 19:05 -0800 |
| Message-ID | <b10dbe37-c35c-4260-9779-50c0cb2899f3@googlegroups.com> |
| In reply to | #3956 |
On Thursday, 12 October 2017 15:53:09 UTC+10, Brian Patrie wrote: > At the risk of being pedantic: > > Does it not delete (when properly implemented--as in the likes of > AppleWorks, or ProgramWriter)? You've gotten used to a nomenclature > that descends from typewriters--which, of course, do not delete. A more > properly descriptive name for the intended function of this key is > delete-to-left. The IBMoid PC Delete key is, of course, delete-to-right. Exactly. The 'delete' key has had the same label and been in the same spot on every Apple machine since the IIe (where it was introduced). Who's right ? > FWIW: The Apple II delete key sends an ASCII rubout character. > And the left-arrow key sends backspace. And it does exactly what a TTY or paper tape printer does. ASCII "Backspace" moves the carriage back one space, and that's exactly what happens on an Apple II when you press the left arrow key. Even the 'delete' key on the IIe/IIc/IIgs behaves ostensibly correctly from an ASCII point of view - the crosshatch is a visual representation of what ASCII delete does to a punched tape which is punch all the holes :-)
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2017-10-09 23:46 -0700 |
| Message-ID | <976fb56d-40af-449b-925f-90dc8b1996df@googlegroups.com> |
| In reply to | #3940 |
On Monday, October 9, 2017 at 10:48:00 PM UTC-6, Bill Chatfield wrote: > It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it. > > https://github.com/gungwald/delhndlr > > It assembles with Merlin. This simple little routine should work for both Prodos and Dos3.3 but won't work with 80-col cards in a II+. * FOR PRODOS LDA #<DELETE STA $BE32 LDA #>DELETE STA $BE33 RTS * FOR DOS 3.3 LDA #<DELETE STA $38 LDA #>DELETE STA $39 JMP $3EA DELETE BIT $C01F BMI COL80 JSR FD0C BNE DEL2 COL80 JSR $C305 DEL2 CMP #$FF BNE RETURN LDA #$88 JSR $FDED LDA #$A0 JSR $FDED LDA #$88 RETURN RTS I am not totally sure of the Dos 3.3 method, it has been too long and my notes are not handy. But I use this routine regularly under Prodos. You can also add a routine to make sure THIS routine is re-enabled on RESET.
[toc] | [prev] | [next] | [standalone]
| From | "Mark D. Overholser" <marko@markoverholser.com> |
|---|---|
| Date | 2017-10-10 09:59 -0700 |
| Message-ID | <f06f37f1-72b5-1cb0-d342-a9ed0dc7d6c4@markoverholser.com> |
| In reply to | #3942 |
On 09-Oct-17 23:46, gids.rs@sasktel.net wrote: > On Monday, October 9, 2017 at 10:48:00 PM UTC-6, Bill Chatfield > wrote: >> It always frustrated me that the Delete key did not work right. >> I've written a handler to fix it. It's not perfect yet. It breaks >> the escape key handling and the arrow keys. I'm still working on >> it. >> >> https://github.com/gungwald/delhndlr >> >> It assembles with Merlin. > > This simple little routine should work for both Prodos and Dos3.3 but > won't work with 80-col cards in a II+. Since the Apple ][ and Apple ][+ don't have the DELETE key, that would be a Moot Point..... MarkO
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2017-10-10 21:02 -0700 |
| Message-ID | <66a67557-039e-414c-8901-871b3bf8972b@googlegroups.com> |
| In reply to | #3946 |
On Tuesday, October 10, 2017 at 10:59:49 AM UTC-6, Mark D. Overholser wrote: > On 09-Oct-17 23:46, Rob wrote: > > On Monday, October 9, 2017 at 10:48:00 PM UTC-6, Bill Chatfield > > wrote: > >> It always frustrated me that the Delete key did not work right. > >> I've written a handler to fix it. It's not perfect yet. It breaks > >> the escape key handling and the arrow keys. I'm still working on > >> it. > >> > >> https://github.com/gungwald/delhndlr > >> > >> It assembles with Merlin. > > > > This simple little routine should work for both Prodos and Dos3.3 but > > won't work with 80-col cards in a II+. > > > > Since the Apple ][ and Apple ][+ don't have the DELETE key, that would > be a Moot Point..... > > > > MarkO The routine can be mapped to any key or Ctrl-key, not just the Delete key. For the II or II+, just change the CMP #$FF to the key combination of your choice.
[toc] | [prev] | [next] | [standalone]
| From | Bill Chatfield <billchatfield1@gmail.com> |
|---|---|
| Date | 2017-10-10 21:21 -0700 |
| Message-ID | <13107aa9-d836-45e8-881c-1a7888981255@googlegroups.com> |
| In reply to | #3942 |
On Tuesday, October 10, 2017 at 2:46:44 AM UTC-4, gid...@sasktel.net wrote: > On Monday, October 9, 2017 at 10:48:00 PM UTC-6, Bill Chatfield wrote: > > It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it. > > > > https://github.com/gungwald/delhndlr > > > > It assembles with Merlin. > > This simple little routine should work for both Prodos and Dos3.3 but won't work with 80-col cards in a II+. > > * FOR PRODOS > LDA #<DELETE > STA $BE32 > LDA #>DELETE > STA $BE33 > RTS > > * FOR DOS 3.3 > LDA #<DELETE > STA $38 > LDA #>DELETE > STA $39 > JMP $3EA > > DELETE BIT $C01F > BMI COL80 > JSR FD0C > BNE DEL2 > > COL80 JSR $C305 > > DEL2 CMP #$FF > BNE RETURN > LDA #$88 > JSR $FDED > LDA #$A0 > JSR $FDED > LDA #$88 > RETURN RTS > > I am not totally sure of the Dos 3.3 method, it has been too long and my notes are not handy. > > But I use this routine regularly under Prodos. You can also add a routine to make sure THIS routine is re-enabled on RESET. Well, if I wanted something simple, I wouldn't have written all that code. :-) Seriously, this looks good. What does is the sub at $C305?
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2017-10-11 07:56 -0700 |
| Message-ID | <fc5a5c2b-8e00-47a7-ad52-ac1ac485c5c4@googlegroups.com> |
| In reply to | #3949 |
On Tuesday, October 10, 2017 at 10:21:30 PM UTC-6, Bill Chatfield wrote: > On Tuesday, October 10, 2017 at 2:46:44 AM UTC-4, gid...@sasktel.net wrote: > > On Monday, October 9, 2017 at 10:48:00 PM UTC-6, Bill Chatfield wrote: > > > It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it. > > > > > > https://github.com/gungwald/delhndlr > > > > > > It assembles with Merlin. > > > > This simple little routine should work for both Prodos and Dos3.3 but won't work with 80-col cards in a II+. > > > > * FOR PRODOS > > LDA #<DELETE > > STA $BE32 > > LDA #>DELETE > > STA $BE33 > > RTS > > > > * FOR DOS 3.3 > > LDA #<DELETE > > STA $38 > > LDA #>DELETE > > STA $39 > > JMP $3EA > > > > DELETE BIT $C01F > > BMI COL80 > > JSR FD0C > > BNE DEL2 > > > > COL80 JSR $C305 > > > > DEL2 CMP #$FF > > BNE RETURN > > LDA #$88 > > JSR $FDED > > LDA #$A0 > > JSR $FDED > > LDA #$88 > > RETURN RTS > > > > I am not totally sure of the Dos 3.3 method, it has been too long and my notes are not handy. > > > > But I use this routine regularly under Prodos. You can also add a routine to make sure THIS routine is re-enabled on RESET. > > Well, if I wanted something simple, I wouldn't have written all that code. :-) > > Seriously, this looks good. What does is the sub at $C305? That is the input routine for the 80-col card, same as $FD0C is input for 40-col. $C307 is the output for 80-col same as $FDED is output for 40-col. And the BIT $C01F indicates when 80-col mode is turned on.
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2017-10-11 08:02 -0700 |
| Message-ID | <41deb69f-5b24-411e-8d31-ecb26a23b88d@googlegroups.com> |
| In reply to | #3951 |
On Wednesday, October 11, 2017 at 8:56:56 AM UTC-6, gid...@sasktel.net wrote: > On Tuesday, October 10, 2017 at 10:21:30 PM UTC-6, Bill Chatfield wrote: > > On Tuesday, October 10, 2017 at 2:46:44 AM UTC-4, gid...@sasktel.net wrote: > > > On Monday, October 9, 2017 at 10:48:00 PM UTC-6, Bill Chatfield wrote: > > > > It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it. > > > > > > > > https://github.com/gungwald/delhndlr > > > > > > > > It assembles with Merlin. > > > > > > This simple little routine should work for both Prodos and Dos3.3 but won't work with 80-col cards in a II+. > > > > > > * FOR PRODOS > > > LDA #<DELETE > > > STA $BE32 > > > LDA #>DELETE > > > STA $BE33 > > > RTS > > > > > > * FOR DOS 3.3 > > > LDA #<DELETE > > > STA $38 > > > LDA #>DELETE > > > STA $39 > > > JMP $3EA > > > > > > DELETE BIT $C01F > > > BMI COL80 > > > JSR FD0C > > > BNE DEL2 > > > > > > COL80 JSR $C305 > > > > > > DEL2 CMP #$FF > > > BNE RETURN > > > LDA #$88 > > > JSR $FDED > > > LDA #$A0 > > > JSR $FDED > > > LDA #$88 > > > RETURN RTS > > > > > > I am not totally sure of the Dos 3.3 method, it has been too long and my notes are not handy. > > > > > > But I use this routine regularly under Prodos. You can also add a routine to make sure THIS routine is re-enabled on RESET. > > > > Well, if I wanted something simple, I wouldn't have written all that code. :-) > > > > Seriously, this looks good. What does is the sub at $C305? > > > That is the input routine for the 80-col card, same as $FD0C is input for 40-col. $C307 is the output for 80-col same as $FDED is output for 40-col. > > And the BIT $C01F indicates when 80-col mode is turned on. Change that to $FDF0 being output and $FD1B being input for 40-col. $FD0C and $FDED point to the input and ouput vectors at $36.39.
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2017-10-11 08:15 -0700 |
| Message-ID | <b23c7c13-b4f3-4962-8ce0-a8db1c2ac799@googlegroups.com> |
| In reply to | #3949 |
On Tuesday, October 10, 2017 at 10:21:30 PM UTC-6, Bill Chatfield wrote:
> On Tuesday, October 10, 2017 at 2:46:44 AM UTC-4, gid...@sasktel.net wrote:
> > On Monday, October 9, 2017 at 10:48:00 PM UTC-6, Bill Chatfield wrote:
> > > It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it.
> > >
> > > https://github.com/gungwald/delhndlr
> > >
> > > It assembles with Merlin.
> >
> > This simple little routine should work for both Prodos and Dos3.3 but won't work with 80-col cards in a II+.
> >
> > * FOR PRODOS
> > LDA #<DELETE
> > STA $BE32
> > LDA #>DELETE
> > STA $BE33
> > RTS
> >
> > * FOR DOS 3.3
> > LDA #<DELETE
> > STA $38
> > LDA #>DELETE
> > STA $39
> > JMP $3EA
> >
> > DELETE BIT $C01F
> > BMI COL80
> > JSR FD0C
> > BNE DEL2
> >
> > COL80 JSR $C305
> >
> > DEL2 CMP #$FF
> > BNE RETURN
> > LDA #$88
> > JSR $FDED
> > LDA #$A0
> > JSR $FDED
> > LDA #$88
> > RETURN RTS
> >
> > I am not totally sure of the Dos 3.3 method, it has been too long and my notes are not handy.
> >
> > But I use this routine regularly under Prodos. You can also add a routine to make sure THIS routine is re-enabled on RESET.
>
> Well, if I wanted something simple, I wouldn't have written all that code. :-)
>
> Seriously, this looks good. What does is the sub at $C305?
Here is the corrected version with comments.
Note the change from $FD0C to $FD1B
This not only works for Prodos and Dos 3.3 but also works in both 40-col and 80-col mode
* FOR PRODOS
* setup Basic.system vectors for input
LDA #<DELETE
STA $BE32
LDA #>DELETE
STA $BE33
RTS
* FOR DOS 3.3
* setup Dos vectors to get a keypress
LDA #<DELETE
STA $38
LDA #>DELETE
STA $39
JMP $3EA
DELETE BIT $C01F ; are we in 80-col mode?
BMI COL80 ; branch if yes
JSR $FD1B ; changed from $FD0C
BNE DEL2
COL80 JSR $C305 ; for 80-col input
DEL2 CMP #$FF ; is the Delete key pressed; change to something else for the Apple II or II+
BNE RETURN ; if not then let DOS or Basic.sys handle the keypress
LDA #$88 ; go back one space; same action as the left arrow
JSR $FDED ; print it
LDA #$A0 ; print a space
JSR $FDED
LDA #$88 ; go back over the space
RETURN RTS ; let Dos or BS handle the last character
[toc] | [prev] | [next] | [standalone]
| From | James Davis <JPD.Enterprises@outlook.com> |
|---|---|
| Date | 2017-10-11 17:50 -0700 |
| Message-ID | <ba40e373-417b-457d-93a3-c552682755c2@googlegroups.com> |
| In reply to | #3953 |
On Wednesday, October 11, 2017 at 8:15:12 AM UTC-7, gid...@sasktel.net wrote:
> On Tuesday, October 10, 2017 at 10:21:30 PM UTC-6, Bill Chatfield wrote:
> > On Tuesday, October 10, 2017 at 2:46:44 AM UTC-4, gid...@sasktel.net wrote:
> > > On Monday, October 9, 2017 at 10:48:00 PM UTC-6, Bill Chatfield wrote:
> > > > It always frustrated me that the Delete key did not work right. I've written a handler to fix it. It's not perfect yet. It breaks the escape key handling and the arrow keys. I'm still working on it.
> > > >
> > > > https://github.com/gungwald/delhndlr
> > > >
> > > > It assembles with Merlin.
> > >
> > > This simple little routine should work for both Prodos and Dos3.3 but won't work with 80-col cards in a II+.
> > >
> > > * FOR PRODOS
> > > LDA #<DELETE
> > > STA $BE32
> > > LDA #>DELETE
> > > STA $BE33
> > > RTS
> > >
> > > * FOR DOS 3.3
> > > LDA #<DELETE
> > > STA $38
> > > LDA #>DELETE
> > > STA $39
> > > JMP $3EA
> > >
> > > DELETE BIT $C01F
> > > BMI COL80
> > > JSR FD0C
> > > BNE DEL2
> > >
> > > COL80 JSR $C305
> > >
> > > DEL2 CMP #$FF
> > > BNE RETURN
> > > LDA #$88
> > > JSR $FDED
> > > LDA #$A0
> > > JSR $FDED
> > > LDA #$88
> > > RETURN RTS
> > >
> > > I am not totally sure of the Dos 3.3 method, it has been too long and my notes are not handy.
> > >
> > > But I use this routine regularly under Prodos. You can also add a routine to make sure THIS routine is re-enabled on RESET.
> >
> > Well, if I wanted something simple, I wouldn't have written all that code. :-)
> >
> > Seriously, this looks good. What does is the sub at $C305?
>
>
>
> Here is the corrected version with comments.
> Note the change from $FD0C to $FD1B
> This not only works for Prodos and Dos 3.3 but also works in both 40-col and 80-col mode
>
> * FOR PRODOS
> * setup Basic.system vectors for input
> LDA #<DELETE
> STA $BE32
> LDA #>DELETE
> STA $BE33
> RTS
>
> * FOR DOS 3.3
> * setup Dos vectors to get a keypress
> LDA #<DELETE
> STA $38
> LDA #>DELETE
> STA $39
> JMP $3EA
>
> DELETE BIT $C01F ; are we in 80-col mode?
> BMI COL80 ; branch if yes
> JSR $FD1B ; changed from $FD0C
> BNE DEL2
>
> COL80 JSR $C305 ; for 80-col input
>
> DEL2 CMP #$FF ; is the Delete key pressed; change to something else for the Apple II or II+
> BNE RETURN ; if not then let DOS or Basic.sys handle the keypress
> LDA #$88 ; go back one space; same action as the left arrow
> JSR $FDED ; print it
> LDA #$A0 ; print a space
> JSR $FDED
> LDA #$88 ; go back over the space
> RETURN RTS ; let Dos or BS handle the last character
Would it not be better to use CSW and KSW rather than COUT and KEYIN?
Pertinent Definitions/Equates from my interpretation of the Apple II Monitors:
CSWL EQU $36 ; LOW BYTE OF OUTPUT ADDRESS VECTOR TO ROUTINE
; THAT PROCESSES OUTPUT CHARACTERS; SET WITH
; OUTPORT, & BY PR#S; RESET, "0" + CTRL-P, &
; PR#0, SET THIS LOCATION TO $FDF0 (COUT1: MON-
; ITOR OUTPUT TO SCREEN); "S" + CTRL-P, & PR#S,
; SET THIS LOCATION TO $CS00 (SLOT "S" ROM).
CSWH EQU $37 ; HIGH BYTE OF OUTPUT ADDRESS VECTOR TO ROUTINE
; THAT PROCESSES OUTPUT CHARACTERS; SET WITH
; OUTPORT, & BY PR#S; RESET, "0" + CTRL-P, &
; PR#0, SET THIS LOCATION TO $FDF0 (COUT1: MON-
; ITOR OUTPUT TO SCREEN); "S" + CTRL-P, & PR#S,
; SET THIS LOCATION TO $CS00 (SLOT "S" ROM).
KSWL EQU $38 ; LOW BYTE OF INPUT ADDRESS VECTOR TO ROUTINE
; THAT PROCESSES INPUT CHARACTERS; SET WITH
; INPORT, & BY IN#S; RESET, "0" + CTRL-K, &
; IN#0, SET THIS LOCATION TO $FD1B (KEYIN: MON-
; ITOR KEYBOARD INPUT ROUTINE); "S" + CTRL-K, &
; IN#S, SET THIS LOCN TO $CS00 (SLOT "S" ROM).
KSWH EQU $39 ; HIGH BYTE OF INPUT ADDRESS VECTOR TO ROUTINE
; THAT PROCESSES INPUT CHARACTERS; SET WITH
; INPORT, & BY IN#S; RESET, "0" + CTRL-K, &
; IN#0, SET THIS LOCATION TO $FD1B (KEYIN: MON-
; ITOR KEYBOARD INPUT ROUTINE); "S" + CTRL-K, &
; IN#S, SET THIS LOCN TO $CS00 (SLOT "S" ROM).
RNDL EQU $4E ; LOW BYTE OF NUMBER RANDOMIZED WITH EACH KEY
; ENTRY DONE BY MONITOR KEYIN ROUTINE (& BY
; MANY OTHER ROUTINES SUCH AS SERIAL & PARALLEL
; COMMUNICATIONS CARDS, WHICH ARE USED TO
; REPLACE KEYIN); RANDOMIZATION ACCOMPLISHED BY
; CONTINUOUSLY INCREMENTING WHILE AWAITING
; KEYBOARD INPUT.
RNDH EQU $4F ; HIGH BYTE OF NUMBER RANDOMIZED WITH EACH KEY
; ENTRY DONE BY MONITOR KEYIN ROUTINE (& BY
; MANY OTHER ROUTINES SUCH AS SERIAL & PARALLEL
; COMMUNICATIONS CARDS, WHICH ARE USED TO
; REPLACE KEYIN); RANDOMIZATION ACCOMPLISHED BY
; CONTINUOUSLY INCREMENTING WHILE AWAITING
; KEYBOARD INPUT.
;---------------------------------------------------------------------
KEYIN EQU $FD1B ; INCREMENT RANDOM NUMBER LOW; IF (RNDL)<>(0)
; -741 ; BRANCH TO KEYIN2; ELSE, INCREMENT RANDOM
; NUMBER HIGH (RNDH), IGNORING OVERFLOW.
KEYIN2 EQU $FD21 ; [BRANCH LABEL]; KEY DOWN?; IF NOT, BRANCH TO
; -735 ; KEYIN; REPLACE FLASHING CURSOR; GET KEYCODE;
; CLEAR KEY STROBE; RETURN TO CALLER; THE A-REG
; CONTAINS THE KEYPRESS KEYCODE.
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; KEYIN~KEYIN2 GETS THE NEXT KEY INPUT FROM THE KEYBOARD: FIRST, KEYIN
; INCREMENTS THE RANDOM NUMBER FIELD (IGNORING OVERFLOW); THEN, KEYIN2
; TESTS THAT A KEY HAS BEEN PRESSED & IF NOT, LOOPS BACK TO KEYIN;
; ELSE, THE CHARACTER MODIFIED BY RDKEY IS RESTORED FROM FLASHING TO
; NORMAL/INVERSE/FLASHING [THE CHARACTER IN THE A-REG AT ENTRY IS
; STORED AT (BASL),Y]; NEXT, KEYIN2 LOADS THE A-REG FROM THE KEYBOARD
; WITH THE KEYCODE OF THE KEY PRESSED; THEN CLEARS THE KEYBOARD
; STROBE; & RETURNS TO CALLER; THE A-REG IS ALTERED.
;---------------------------------------------------------------------
COUT EQU $FDED ; VECTOR TO USER OUTPUT ROUTINE; OUTPUTS/PRINTS
; -531 ; THE CHARACTER/BYTE IN A-REG TO OUTPUT DEVICE
; SPECIFIED BY JUMP INDIRECT TO (CSWL~CSWH)--
; (NORMALLY TO COUT1); THE A-REG IS ALTERED.
Well, COUT is OK, rather than CSW, since it uses the vector too.
[toc] | [prev] | [next] | [standalone]
| From | gids.rs@sasktel.net |
|---|---|
| Date | 2017-10-11 20:42 -0700 |
| Message-ID | <c234abcb-7373-472f-a604-131e8e3acf64@googlegroups.com> |
| In reply to | #3954 |
> Would it not be better to use CSW and KSW rather than COUT and KEYIN? Basic.system has its own input and output intercepts at $BE30.BE33 in its global page from $BE00.BEFF. And unless you know what BS does with CSW and KSW, it is best to let it be in charge of setting them and handling them while it is in control. You can find a good description of Basic.systems global page in the "Prodos 8 Technical Reference Manual".
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.sys.apple2.programmer
csiph-web