mirror of
https://github.com/catseye/Apple-Befunge.git
synced 2024-06-17 17:30:52 +00:00
Abandon APPLE BEFUNGE RUNNER.
This commit is contained in:
parent
b814c28d84
commit
17f30b83e9
|
@ -1,6 +1,8 @@
|
||||||
Apple Befunge
|
Apple Befunge
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
_Version 1.1, February 2012, Chris Pressey, Cat's Eye Technologies_
|
||||||
|
|
||||||
Apple Befunge is a "retrolanguage" for the Apple ][+. Being written
|
Apple Befunge is a "retrolanguage" for the Apple ][+. Being written
|
||||||
in Applesoft BASIC, it should also work on an Apple //e or similar
|
in Applesoft BASIC, it should also work on an Apple //e or similar
|
||||||
model of 8-bit Apple computer (or, of course, an emulator thereof.)
|
model of 8-bit Apple computer (or, of course, an emulator thereof.)
|
||||||
|
@ -34,11 +36,12 @@ Letters `A` through `F` represent values 10 through 15, respectively.
|
||||||
|
|
||||||
The `;` (semicolon) symbol begins and ends "ignoremode".
|
The `;` (semicolon) symbol begins and ends "ignoremode".
|
||||||
|
|
||||||
If the _x_ argument to `G` is negative, the result is `PEEK(_y_)`.
|
If the _x_ argument to `G` is negative, the result is `PEEK(`_y_`)`.
|
||||||
|
|
||||||
If the _x_ argument to `P` is negative, the result is `POKE _y_, _d_`.
|
If the _x_ argument to `P` is negative, the result is `POKE `_y_`, `_d_.
|
||||||
|
|
||||||
The `]` instruction pops an argument _a_ off the stack; the result is `CALL _a_`.
|
The `]` instruction pops an argument _a_ off the stack; the result is
|
||||||
|
`CALL `_a_.
|
||||||
|
|
||||||
These three instructions allow a direct interface to the architecture of the
|
These three instructions allow a direct interface to the architecture of the
|
||||||
8-bit Apple system on which Apple Befunge is running.
|
8-bit Apple system on which Apple Befunge is running.
|
||||||
|
@ -50,20 +53,28 @@ The distribution contains an Apple disk image, formatted with _ESDOS ][_.
|
||||||
It contains:
|
It contains:
|
||||||
|
|
||||||
* a full visual debugger/editor for Apple Befunge called
|
* a full visual debugger/editor for Apple Befunge called
|
||||||
`APPLE BEFUNGE EDITOR`;
|
`APPLE BEFUNGE EDITOR`; and
|
||||||
* a less obtrustive but unfinished interpreter called
|
|
||||||
`APPLE BEFUNGE RUNNER`; and
|
|
||||||
* a handful of Befunge programs which have been converted to Apple Befunge
|
* a handful of Befunge programs which have been converted to Apple Befunge
|
||||||
format.
|
format.
|
||||||
|
|
||||||
The distribution also contains the source code, in ASCII text, for
|
The distribution also contains the source code, in ASCII text, for
|
||||||
`APPLE BEFUNGE EDITOR` and `APPLE BEFUNGE RUNNER`.
|
`APPLE BEFUNGE EDITOR`. It is intended to be copied-and-pasted into an
|
||||||
|
Apple ][+ emulator. This process, and the program itself, have been
|
||||||
|
tested on a recent version of [AppleWin](http://applewin.berlios.de/).
|
||||||
|
|
||||||
|
In version 1.0 of the distribution there was also a program called
|
||||||
|
`APPLE BEFUNGE RUNNER`; its source code was intended to be pasted into
|
||||||
|
the emulator after that of `APPLE BEFUNGE EDITOR`, acting as a sort of
|
||||||
|
"diff", adding and deleting lines. This proved to be a nuisance for
|
||||||
|
maintaining `APPLE BEFUNGE EDITOR`. And I think `APPLE BEFUNGE EDITOR`
|
||||||
|
alone sort of gets the point across. So in version 1.1, `APPLE BEFUNGE
|
||||||
|
RUNNER` was abandoned.
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
The source code for `APPLE BEFUNGE EDITOR` and `APPLE BEFUNGE RUNNER` are
|
The source code for `APPLE BEFUNGE EDITOR` is hereby placed, by me, the
|
||||||
hereby placed, by me, the author, in the public domain.
|
author, in the public domain.
|
||||||
|
|
||||||
Known Bugs and Shortcomings
|
Known Bugs and Shortcomings
|
||||||
---------------------------
|
---------------------------
|
||||||
|
@ -76,6 +87,7 @@ longer know how, but I could probably look it up.
|
||||||
Subtle bug in either `%` (modulo) or `'` (greater than) or `hex.bf` --
|
Subtle bug in either `%` (modulo) or `'` (greater than) or `hex.bf` --
|
||||||
not entirely sure which.
|
not entirely sure which.
|
||||||
|
|
||||||
A good reorganization of `APPLE BEFUNGE EDITOR` source is in order. The
|
A good reorganization of `APPLE BEFUNGE EDITOR`'s source is in order. The
|
||||||
push and pop subroutines should probably be as near the beginning of the
|
push and pop subroutines should probably be as near the beginning of the
|
||||||
program as possible. Should hold more constant values in variables.
|
program as possible. More constant values should be held in variables, as
|
||||||
|
well.
|
||||||
|
|
|
@ -1,82 +0,0 @@
|
||||||
REM THIS SOURCE SHOULD FOLLOW UPLOAD OF 'APPLE BEFUNGE EDITOR'
|
|
||||||
REM AS IT USES IT AS THE BASIS FOR 'APPLE BEFUNGE RUNNER'
|
|
||||||
REM PROGRAMMING IN APPLESOFT IS MORE INTERESTING LIKE THIS :-)
|
|
||||||
|
|
||||||
REM ***
|
|
||||||
REM BEWARE!
|
|
||||||
REM THIS SOURCE HAS NOT BEEN UPDATED YET
|
|
||||||
REM TO MATCH APPLE BEFUNGE EDITOR 1.1
|
|
||||||
REM ***
|
|
||||||
|
|
||||||
1 REM APPLE BEFUNGE RUNNER V1.0
|
|
||||||
2 REM ----- ------- ------ ----
|
|
||||||
|
|
||||||
99 REM HOME
|
|
||||||
190 RM%=1:REM GOTO 710:REM EDIT
|
|
||||||
210 REM VTAB Y%+1:HTAB X%+1
|
|
||||||
|
|
||||||
310 RETURN: REM J%=0: REM ???DELETE 300-399
|
|
||||||
|
|
||||||
710 RETURN: REM GOSUB 8010:REM DISPLAY PAGE: REM ???DELETE 700-899
|
|
||||||
|
|
||||||
1500 REM & INPUT INTEGER:REM ???DELETE 1500-1599
|
|
||||||
1510 REM
|
|
||||||
1520 REM
|
|
||||||
1530 INPUT "";WT$:D%=VAL(WT$):GOSUB 500:RETURN
|
|
||||||
1535 REM
|
|
||||||
1537 REM
|
|
||||||
1538 REM
|
|
||||||
1540 REM
|
|
||||||
1550 REM
|
|
||||||
1590 RETURN
|
|
||||||
|
|
||||||
1800 REM , OUTPUT CHARACTER:REM ???DELETE 1800-1899
|
|
||||||
1810 GOSUB 600
|
|
||||||
1820 IF D%<>10 THEN GOTO 1880
|
|
||||||
1825 PRINT:RETURN
|
|
||||||
1830 REM
|
|
||||||
1840 REM
|
|
||||||
1850 REM
|
|
||||||
1858 REM
|
|
||||||
1860 RETURN
|
|
||||||
1880 PRINT CHR$(D%);:RETURN
|
|
||||||
1882 REM
|
|
||||||
1890 RETURN
|
|
||||||
|
|
||||||
2000 REM . OUTPUT INTEGER:REM ???DELETE 2000-2099
|
|
||||||
2010 GOSUB 600
|
|
||||||
2020 PRINT STR$(D%);" ";:RETURN
|
|
||||||
2030 REM
|
|
||||||
2090 RETURN
|
|
||||||
|
|
||||||
2600 REM ~ INPUT CHARACTER
|
|
||||||
2601 REM USES = ON APPLE ][+
|
|
||||||
2610 GET WT$:D%=ASC(WT$):GOSUB 500:RETURN
|
|
||||||
2615 REM
|
|
||||||
2620 REM
|
|
||||||
2626 REM
|
|
||||||
2628 REM
|
|
||||||
2630 REM
|
|
||||||
2640 REM
|
|
||||||
2690 RETURN
|
|
||||||
|
|
||||||
2900 REM @ END PROGRAM
|
|
||||||
2910 END:REM
|
|
||||||
2920 REM
|
|
||||||
2930 REM
|
|
||||||
2935 REM
|
|
||||||
2940 REM
|
|
||||||
2990 REM
|
|
||||||
|
|
||||||
3700 REM P PUT INTO SPACE
|
|
||||||
3710 GOSUB 600
|
|
||||||
3715 E%=D%
|
|
||||||
3720 GOSUB 600
|
|
||||||
3725 F%=D%
|
|
||||||
3730 GOSUB 600
|
|
||||||
3732 IF F%<0 THEN POKE E%,D%:GOTO 3790
|
|
||||||
3740 PG%(F%,E%)=D%
|
|
||||||
3742 RETURN:REM HTAB F%+1:VTAB E%+1:INVERSE:PRINT CHR$(D%);:NORMAL
|
|
||||||
3790 RETURN
|
|
||||||
|
|
||||||
REM DELETE 6000-7129
|
|
Loading…
Reference in New Issue
Block a user