LOMEM für TurboBasic ändern


LOMEM für TurboBasic ändern

von andreasb » Fr 20. Apr 2007, 19:03
In der Newsgroup comp.sys.atari.8bit habe ich folgendes Posting gefunden:

Code: Alles auswählen
Try this program:
10 REM this program is saved as AUTORUN.BAS
20 MEMLO=$02E7:LOMEM=$80:INITBAS=$0470
25 _MEMLO=$3BFC:REM this is your new MEMLO, normal value is 13865(=$3629)
30 IF DPEEK(MEMLO)<>_MEMLO OR DPEEK(LOMEM)<>_MEMLO
35   DPOKE MEMLO,_MEMLO
40   DPOKE LOMEM,_MEMLO
45   RUN "D:AUTORUN.BAS":REM place name of this program here
50 ELSE
55   X=USR(INITBAS):REM this initializes TurboBASIC XL
60   RUN "D:PROGRAM":REM place name of next program here
95 ENDIF

So to reserve 192 bytes you would set _MEMLO=13865+192.
I used the above program to install device handlers.  One was a memory handler that accessed the 1MB of ram I hand in my 130XE.  If you have any questions about the example, let me know.
Demivec


Das fand ich besonders interessant, da in diesem Thread:
http://www.abbuc.de/modules.php?name=Fo ... highlight=

Dietrich darauf hinwies, dass BiboDos bei 4 konfigurierten Laufwerken ein zu hohes LOMEM aufweist, so dass TurboBasic dann nicht mehr läuft.

Mit der o.g. Autorun.bas-Routine sollte es dann funktionieren. :-)

von Dietrich » Fr 4. Mai 2007, 23:52
Dieser Trick ist keine Lösung für das Bibo-DOS-Problem:

1.) Das Programm wird nach dem Laden des Turbobasic in den Speicher geladen. Zu diesem Zeitpunkt hat Turbobasic das modifizierte Bibodos bereits überschrieben

2.) Das Programm verschiebt nicht das Turbobasic, sondern das Basic-Programm. Beim Turbobasic sieht der Speicher so aus

$700 DOS
$2080 Turbobasic
$3629 Basic-Programm

Das Programm ändert das so ab:

$700 DOS
$2080 Turbobasic
$3629 frei
$3BFC Basic-Programm
D.h. man hat vor dem Basic-Programm etwas freien Speicher zur Verfügung, um dort z.b. einen Gerätetreiber (device handler) unterzubringen.

Gruß Dietrich (den das Turbobasic-Lomem nicht stört)