Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: mmphosis Newsgroups: comp.sys.apple2 Subject: Embed binary code in Applesoft program lines Date: Thu, 15 Jul 2021 00:19:57 -0000 (UTC) Organization: Mac GUI Lines: 29 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 15 Jul 2021 00:19:57 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="c4bfe9f638a8e4998d76b216701a63c3"; logging-data="17814"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ubKyYQJCsyszY8Df0hcO/" User-Agent: Mac GUI Usenet Cancel-Lock: sha1:7z5q2dF2jAgZVkHE0H8V7D/xkdw= Xref: csiph.com comp.sys.apple2:46384 For those that might be interested, here is an example of this method. My program is "listable" and definitely "fragile." You can use different line numbers, so long as you GOSUB to the single line with the : just before the line with the CALL and the embedded binary. 10 HOME : GOSUB 62910: PRINT PEEK (78), PEEK (79):X = RND ( - 1 * ( PEEK (78) + 256 * PEEK (79))): PRINT X 62900 END 62910 : 62920 CALL PEEK (121) + PEEK (122) * 256 + 37: RETURN : VTAB P CLEAR TAB( NEW L HCOLOR= INT ONERR L IF LL IF LL IF LL VTAB @ CLEAR TAB( NEW 0 ASC ASC N = MID$ ASC O8 GOSUB VAL https://www.applefritter.com/comment/93931#comment-93931 ----- From Slammer! "other methods" ... * Embed binary code in program lines Speedy, but difficult to manage and access, can make programs unlistable, and also fragile if any lines are changed. http://www.ivanx.com/appleii/slammer/othermethods.html