Groups | Search | Server Info | Login | Register


Groups > comp.sys.apple2 > #46384

Embed binary code in Applesoft program lines

Path csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From mmphosis <mmphosis@macgui.com>
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 <mmphosis-1626308395@macgui.com> (permalink)
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

Show key headers only | View raw


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


Back to comp.sys.apple2 | Previous | NextNext in thread | Find similar


Thread

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