CBASIC für CP/M-68k

    • Offizieller Beitrag

    Hallo!


    Ich habe hier versucht, CBASIC 1.0 von Digital Research auf meiner Sage zu verwenden.


    Ich habe hier 2 Dateien:


    CB68.REL und
    CB68.L68


    Zuerst habe ich mit


    RELOC CB68.REL CB68.68k


    eine ausführbare Datei erzeugt.


    CB68 TEST.BAS


    erzeugt dann ein


    TEST.O


    Ich hätte nun gedacht, mit LO68 TEST.O -U CB68.L68 würde eine ausführbare TEST.68k Datei entstehen. Tut es aber nicht, es entsteht ein
    C.OUT.


    Was mache ich damit? Weiß das einer?


    Gruß
    Stephan

    • Offizieller Beitrag

    So, jetzt gehts. Man muß den Linker "LINK68" nehmen und nicht LO68. Den Link68 habe ich verschachtelt in einem Archiv von Gaby gefunden. Anbei nochmal die komplette ZIP.Datei mit CBASIC/68k. In der Version die man hier und im Netz findet, fehlt immer der richtige Linker. Achso, der Linker velangt ein Komma zwischen Objektdateiname und Library. Das Kompilat ist schlanke 26k groß :fp:

  • Ich hatte bisher das Problem, das manche Programme, die ich mit CBASIC

    auf meinem CP/M-68k SBC

    kompiliert habe, beim Starten folgende Fehlermeldung brachten:


    Exception $03 at user address $00000FE0. Aborted.


    (dazu gehörte z.B. auch das Programm fractal.bas).

    Andere Programme funktionierten dagegen einwandfrei.

    Auf dem 68K Emulator trat dieses Problem nie auf.

    Im RetroBrew Computers Forum habe ich jetzt die Lösung für mein Problem gefunden :)

    https://www.retrobrewcomputers…php?t=msg&th=576&start=0&

    Nachdem ich mein CP/M Bios entsprechend angepaßt habe, ist das Problem gelöst:)

  • Oh, CBASIC. :love:

    Damit habe ich mein erstes Softwareprojekt unter CP/M programmiert (auf einem Siemens PC/16 mit Concurrent CPM/86).


    Und als ich dann später eine MS-DOS-Version von CBASIC bekam, habe ich meinen 6502-Unassembler von Commodore-Basic nach CBASIC portiert.

    • i-Telex 7822222 dege d

    • technikum29 in Kelkheim bei Frankfurt

    • Marburger Stammtisch

    Douglas Adams: "Everything, that is invented and exists at the time of your birth, is natural. Everything that is invented until you´re 35 is interesting, exciting and you can possibly make a career in it. Everything that is invented after you´re 35 is against the law of nature. Apply this list to movies, rock music, word processors and mobile phones to work out how old you are."

  • Das Kompilat ist schlanke 26k groß :fp:

    Das wollte ich jetzt doch mal wissen, und habe das mit C# unter Windows ausprobiert. Wegen der Größe des Kompilats. ;)



    Das Kompilat:

    Code
    27.05.2021  16:09             4.608 Test.exe
                   1 Datei(en),          4.608 Bytes


    Da hat CBASIC ganz schön abgeloost. :ätsch:


    Nein, da fehlen keine Libs oder DLLs. Mehr als die EXE-Datei braucht man nicht.

    Und jetzt kommt mir nicht damit, dass die restlichen 100 MB im .NET Framework stecken. Das ist Teil des Betriebssystems und nicht meines Programmes. :mrgreen:

    • i-Telex 7822222 dege d

    • technikum29 in Kelkheim bei Frankfurt

    • Marburger Stammtisch

    Douglas Adams: "Everything, that is invented and exists at the time of your birth, is natural. Everything that is invented until you´re 35 is interesting, exciting and you can possibly make a career in it. Everything that is invented after you´re 35 is against the law of nature. Apply this list to movies, rock music, word processors and mobile phones to work out how old you are."

  • Hier noch ein paar Anmerkungen zu Codegröße und Ausführungszeit des fractal

    Programms.

    Wird fractal.bas mit dem CBASIC Compiler übersetzt, ist das Programm 28 KByte groß.

    Die Laufzeit des Programms beträgt 4 Minuten und 22 Sekunden. :(

    WIrd fractal.bas im Basic Interpreter (Enhanced 68k BASIC Version 3.52)

    gestartet, beträgt die Laufzeit 1 Minute und 57 Sekunden. :)

    Dasselbe Programm, in C geschrieben, ist nach dem Compilieren mit dem Alcyon C Compiler

    32 KByte groß, und die Laufzeit des Programms beträgt 23 Sekunden.:):)

    (gemessen auf 68000 CPU mit 8 MHz Clock).

  • CBASIC ist langsamer als der Interpreter??? :(


    Ich konnte die Performance von CBASIC damals nicht beurteilen, weil mir jegliche Vergleichsmöglichkeiten fehlten. Ich kannte vorher nur Commodore-Basic. Aber ich fand es einfach nur geil, dass da ein Single-EXE-File rauskam, das ich direkt von der Kommandozeile starten konnte. Sowas kannte ich vorher ja nicht. ;)

    • i-Telex 7822222 dege d

    • technikum29 in Kelkheim bei Frankfurt

    • Marburger Stammtisch

    Douglas Adams: "Everything, that is invented and exists at the time of your birth, is natural. Everything that is invented until you´re 35 is interesting, exciting and you can possibly make a career in it. Everything that is invented after you´re 35 is against the law of nature. Apply this list to movies, rock music, word processors and mobile phones to work out how old you are."

  • Ich wollte auch gerade schreiben, dass ich da die FP-Arithmetik in Verdacht habe.

    • i-Telex 7822222 dege d

    • technikum29 in Kelkheim bei Frankfurt

    • Marburger Stammtisch

    Douglas Adams: "Everything, that is invented and exists at the time of your birth, is natural. Everything that is invented until you´re 35 is interesting, exciting and you can possibly make a career in it. Everything that is invented after you´re 35 is against the law of nature. Apply this list to movies, rock music, word processors and mobile phones to work out how old you are."

  • So, jetzt gehts.

    Toshi Nachdem ich das mit


    Code
    RELOC CB68.REL CB68.68k
    CB68 HELLO.BAS
      => 10 PRINT "Hello World!"
    LINK68 HELLO,CB68.L68
    HELLO
    
    Hello World!

    auf dieser Seite gefunden hatte, fand ich auch hier diesen Thread ;)



    Leider weigert sich die DOS-Version CB86 da obige Hello-World mit CB86 zu bearbeiten.

    Es kommen ganz viele in der Zeile vesetzte ">^1" und fuer jedes mal (95x) bekomme ich einen Error angerechnet (95 erros detected)


    Sieht irgendwie so aus, als kommt er mit der Sektorgroesse der 2GB CF-Platte nicht klar oder mag er kein MS-DOS 6.22?


    Und das HELLO.OBJ hat dann 0 Bytes, so dass LINK86 auch nicht arbeiten kann :(

    Einmal editiert, zuletzt von guidol ()

  • Das Problem hatte ich auch schon.

    Ursache war ein fehlendes EOF ($1a) am Dateiende.

    Wenn man diese Datei dann unter cp/m-68k mit uemacs geöffnet hat,

    kam die Meldung 'funny end of file'

    Ich habe die Datei dann einfach mit uemacs abgespeichert, und das Problem

    war behoben.

  • Danke fuer den Tipp ;)

    Das Problem/die Loesung (per Hex-Editor in Windows und dann per FTP wieder ins DOS) )war es, aber das Problem ist der MS-DOS EDIT, der kein EOF (1A) anfuegt am Ende.

    So hilft mir der CP/M uemacs leider nicht direkt :(



    [EDIT] Habe mal Googleund ChatGPT gefragt und eine relativ einfache Loesung bekommen:


    Code
    COPY /A HELLO.BAS + NUL HELLO.BAS

    (solange mannoch nicht mit einem Hex-Editor dran gebastelt hat)
    Damit wird da benoetigte EOF-Strg-Z angefuegt :)