15

In real machines with two's complement representation, there's only one integer format. The decision of whether 0xffff means -1 or 65535 is dependent on the use it's put to. Output code needs to decide which string of characters to convert 0xffff to. Input code needs to decide whether to complain about values exceeding 15 bits of magnitude. In (mainstream)...


12

It does not appear it saves times or memory in either the encode or decode, but maybe I'm missing something? Well, it kind of simplify decoding. The values $B0..$B9 are exactly what's uses to mark up numbers in literals and variable names. And here they as well simplify the interpreter. In Integer BASIC all tokens are encoded with high bit off, while ...


10

→ Does anyone know of an 8-bit era system that did this? Integer BASIC exists to be very small, just fast enough to develop games on, and out in time for the Apple launch. Syntax niceties would make it bigger, slower and late. The negative integer input is a quirk of its smallness. On other 8-bit systems such as the Amstrad CPC you could do things like ...


9

In this Integer BASIC disassembly, 202/203 ($CA/$CB) is PP - "ptr: start of program". It looks like they're changing the "start of program" location, then re-running it by doing a GOTO 0. My guess is that there's a small BASIC program (the one you see at the start), then a chunk of assembly language that looks like junk when listed, then another small BASIC ...


8

Generally, this involves some very careful work, where you overwrite part of the tokenized BASIC program with the binary data, or add the binary data to the tokenized BASIC code while carefully adjusting the counters showing where things are located in the code. It's a tricky process and I never thought it was worth the trouble, given how easy it is to mess ...


7

Does anyone know of an 8-bit era system that did this? No, at least not the way the question proposes, which is essentially turning 16 bit values into 17 bit. Something no (BASIC) system supports. The only ones that come close are BASICs offering long integer or arbitrary size BCD formats. To be used as 16 bit value, they (and the proposed 17 bit format as ...


7

TL;DR; Was it possible to load integer basic and use it without a language card No, at least not as an official Apple product. DOS 3.3 only supplied an Integer BASIC image to be loaded into Language Card. Then again, A.P.P.L.E. did sell a modified, relocable version of Integer BASIC, called Integer BASIC+, offering many extensions as well. It was ...


5

The technique that zellyn describes above for having the Monitor process a command from the input buffer was, as he said, devised for Applesoft. In fact, one of its crucial elements is specific to that language: the "D9C6G" references the Applesoft ROM code. As it happens, the file that was often distributed to provide Integer BASIC for the Language Card had,...


5

Essentially various sides of the same reason: SWEET16 came too late. Inccoperating it into integer BASIC would have postponed the ROM production further. Integer BASIC was working as is, doing a redesign could have added bugs. What to do with the saved space? Of course one could have added more functions, but again, this would have cost time to write and ...


5

As far as I understand your question, I guess the ZX Spectrum BASIC could be an answer: it stores all numbers in 5-byte format, FPs as well as integers (see more here). This BASIC could store unsigned integers (0-65535) with a "sign" byte, so technically it's a little bit similar to the way you asked for.


3

BBC BASIC, one of the later and more powerful microcomputer BASICs, supported both 40-bit floating point and 32-bit signed integers. Variables in the latter format had a % suffix, analogous to the $ identifying a string variable. This same "Hungarian notation" applies to functions which returned an integer or string variable. When ported to the ARM-based ...


2

Integer BASIC as shipped by Apple in the original ROMs or on DOS diskettes was intended only to run at address E000 to F7FF. On the original Apple II this was ROM which held Integer BASIC. With the language card, it was possible to bank-switch in RAM into this area, and DOS would load a binary image of Integer BASIC, the same as the ROM version, into the ...


2

I can't speak directly to Apple Integer BASIC, but I know that TRS-80 BASIC programs could encode machine language in DATA statements (as in Leo Christopherson's Android NIM) or even in literal strings. A string containing machine code would include lots of non-printing characters that would do things like moving the cursor backward or up, or clearing the ...


Only top voted, non community-wiki answers of a minimum length are eligible