home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.hackers
- Path: sparky!uunet!psgrain!hippo!nuustak!csir.co.za!duck
- From: duck@nuustak.csir.co.za (Paul Ducklin)
- Subject: Re: YAFP: TRS-80 Super Graphics
- Organization: Infotek, CSIR
- Date: Wed, 02 Sep 92 15:24:27 GMT
- Approved: madmax@fruit.bat.net
- Message-ID: <1992Sep02.152427.55@nuustak.csir.co.za>
- References: <1630242@zl2tnm.gen.nz>
- Lines: 48
-
- Self-modifying code was very useful in most micro-Basics for
- things like dynamically sized arrays, where accessing a "new"
- array simply created a default-sized (usually 10 element)
- array without the need for a DIM statement.
-
- I had an assembler I wrote once for the Oric ATMOS [..anyone
- other than me ever *seen* one of these -- I even got grilled
- at customs in Johannesburg for trying to import it {it was 80 quid
- in London in '85} as a gift, but the customs official turned
- out to be a Spectrum fan, which took all the "heat" off..]
- which utilised this technique: insert a line such as
-
- 100 AA(I MOD 10) = whatever
- ^
- |
- Then find out where the second 'A' sat in source mem, and adjust
- it by poking in 65+I/10 to produce AA, AB, AC, AD etc. according
- to the 10-element array you needed to access. Each of AA, AB, AC
- etc. was then only created when first accessed -- a heapish type
- thing.
-
- I also found the
- 10 REM FN = XXXXXXXXXXXXXXXXXXXXXXXXXXX
- 20 RETURN
- to be useful for implementing an infix expression evaluator within the
- assembler -- just POKE the expression to be evaluated into the
- XXXX region and GOSUB 10! Lo - Basic does the work, and the error
- reporting. Of course, you needed to convert '+', '-', '/' etc. from
- ASCII to TokenValue first...
-
- This was not for want of memory [there was 48KB!!], but to reduce
- code size due to a zany cassette interface. You could do 2400bps
- with almost no reliability at all, or 300bps will almost no unreliability.
- Or you could save, say, 4 times at 2400bps and cross your fingers.
-
- Hey -- the ATMOS was a true portable. Transformer in the plug; whole
- base unit smaller than a Poqet; plug into your nearest TV set. The
- display was Prestel only! Weird.
-
- Paul Ducklin
- CSIR - Pretoria - ZA
- --
-
- --<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--<>--
- Paul Ducklin duck@nuustak.csir.co.za
-
- CSIR Computer Virus Research Lab * Box 395 * Pretoria * 0001 S Africa
-
-