Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.sys.apple2 > #46394
| Newsgroups | comp.sys.apple2 |
|---|---|
| Date | 2021-07-16 07:55 -0700 |
| References | <mmphosis-1626308395@macgui.com> <451fbd19-b67a-4ed2-872c-0832a4ec3e50n@googlegroups.com> <4cb552cb-b774-49c6-9b44-01dde71ca571n@googlegroups.com> <a057df6b-989a-4e41-ab38-ebb0e288a4aan@googlegroups.com> <alpine.DEB.2.21.2107160908180.9612@sd-119843.dedibox.fr> |
| Message-ID | <e1c3dc29-6dea-4e48-9cab-3a4aa062ff71n@googlegroups.com> (permalink) |
| Subject | Re: Embed binary code in Applesoft program lines |
| From | fadden <thefadden@gmail.com> |
Take a look at RENUMBER from the DOS 3.3 System Master disk. [...] 1200 HOME : PRINT TAB( 4)"RENUMBER IS INSTALLED AND READY" 1210 VTAB 8: PRINT "IF YOU USE 'FP', 'HIMEM', OR 'MAXFILES'" 1220 PRINT : PRINT " YOU WILL HAVE TO RE-RUN RENUMBER" 10000 REM DO NOT CHANGE 10010 10010 CALL PEEK (121) + PEEK (122) * 256 + 31 It's looking at $79-7a (OLDTEXT), which holds a pointer to the end of the previous line. The machine-language code follows the last line, so really the comment should be, "do not change 10010, or add anything after this line". So long as you follow that rule, you can add or remove lines, and everything just gets moved around. The code it calls relocates itself below DOS and sets up the ampersand vector. One reason to use this sort of approach is for programs on cassette tape. Binary programs must be loaded with an explicit start and length, but BASIC programs can just use LOAD/SAVE. (For Integer BASIC, see https://retrocomputing.stackexchange.com/q/494/56 .)
Back to comp.sys.apple2 | Previous | Next — Previous in thread | Next in thread | Find similar
Embed binary code in Applesoft program lines mmphosis <mmphosis@macgui.com> - 2021-07-15 00:19 +0000
Re: Embed binary code in Applesoft program lines I am Rob <gids.rs@sasktel.net> - 2021-07-14 23:40 -0700
Re: Embed binary code in Applesoft program lines Mike Spangler <mspangler@ifiber.tv> - 2021-07-15 13:05 -0700
Re: Embed binary code in Applesoft program lines Erik Struiksma <eriknoc@gmail.com> - 2021-07-16 03:24 -0700
Re: Embed binary code in Applesoft program lines Erik Struiksma <eriknoc@gmail.com> - 2021-07-16 03:25 -0700
Re: Embed binary code in Applesoft program lines Steve Nickolas <usotsuki@buric.co> - 2021-07-16 09:09 -0400
Re: Embed binary code in Applesoft program lines fadden <thefadden@gmail.com> - 2021-07-16 07:55 -0700
Re: Embed binary code in Applesoft program lines Erik Struiksma <eriknoc@gmail.com> - 2021-07-16 19:05 -0700
Re: Embed binary code in Applesoft program lines mmphosis <mmphosis@macgui.com> - 2021-07-28 21:09 +0000
csiph-web