Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #4996
| From | Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> |
|---|---|
| Newsgroups | comp.sys.apple2.programmer |
| Subject | Re: Call Address to Print BASIC Error Message |
| Date | 2019-02-02 22:56 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <q35op4$ouf$1@dont-email.me> (permalink) |
| References | <f52655a8-0fd6-4aee-b345-8631bb8b3b38@googlegroups.com> <2b9c4542-55b8-4f71-97d1-e0b5ad57b5b4@googlegroups.com> <yubpnsaavnc.fsf@gmail.com> |
On 2019-02-02 1:32 p.m., awanderin wrote: > Here's an all-Applesoft way to do it. Substitute your choice of error > on line 20... > > 10 ONERR GOTO 1000 > 20 PRINT 1 / 0 : REM Generate error > 30 END > 1000 BE = 53856 > 1010 EA = BE + PEEK (222) > 1015 GOSUB 1050 > 1020 EA = BE + 240: GOSUB 1050 > 1030 PRINT " IN LINE " PEEK (218) + 256 * PEEK (219) > 1040 END > 1050 C = PEEK (EA): IF C > 0 AND C < 128 THEN PRINT CHR$ (C);:EA = EA + 1: GOTO 1050 > 1055 IF C > = 128 THEN PRINT CHR$ (C); > 1060 RETURN Just curious why you are checking for C being from 1 to 127 and then later checking to see if it is greater than 127. In both cases you are printing CHR$(C). C will always be between 0 and 255 so the first check could be reduced to just "IF C < 128 THEN PRINT CHR$(C);". I'm assuming you did this to avoid printing the high ASCII last character so line 1055 should probably be "IF C > 127 THEN PRINT CHR$(C-128);". However, as we know that the condition that exits the loop is that C is greater than 127 all you really need on line 1055 is "PRINT CHR$(C-128);".
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Call Address to Print BASIC Error Message Bill Chatfield <billchatfield1@gmail.com> - 2019-01-30 15:16 -0800
Re: Call Address to Print BASIC Error Message James Davis <JPD.Enterprises@outlook.com> - 2019-01-30 18:21 -0800
Re: Call Address to Print BASIC Error Message gids.rs@sasktel.net - 2019-01-30 21:05 -0800
Re: Call Address to Print BASIC Error Message Tom Porter <laseractiveguy@gmail.com> - 2019-01-31 00:35 -0800
Re: Call Address to Print BASIC Error Message kegs@provalid.com (Kent Dickey) - 2019-01-31 21:58 -0600
Re: Call Address to Print BASIC Error Message Michael Pohoreski <michael.pohoreski@gmail.com> - 2019-01-31 22:31 -0800
Call Address to Print BASIC Error Message Michael Pohoreski <michael.pohoreski@gmail.com> - 2019-01-31 23:01 -0800
Re: Call Address to Print BASIC Error Message awanderin <awanderin@gmail.com> - 2019-02-02 11:32 -0700
Re: Call Address to Print BASIC Error Message Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> - 2019-02-02 22:56 -0500
Re: Call Address to Print BASIC Error Message gids.rs@sasktel.net - 2019-02-03 10:19 -0800
Re: Call Address to Print BASIC Error Message Michael Barry <barrym95838@yahoo.com> - 2019-02-04 00:42 -0800
Re: Call Address to Print BASIC Error Message Michael Barry <barrym95838@yahoo.com> - 2019-02-04 00:31 -0800
Re: Call Address to Print BASIC Error Message Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> - 2019-02-04 10:27 -0500
Re: Call Address to Print BASIC Error Message Bill Chatfield <billchatfield1@gmail.com> - 2019-02-09 09:28 -0800
Re: Call Address to Print BASIC Error Message Michael Pohoreski <michael.pohoreski@gmail.com> - 2019-02-09 13:57 -0800
Re: Call Address to Print BASIC Error Message Michael Barry <barrym95838@yahoo.com> - 2019-02-04 01:06 -0800
csiph-web