markmiller Posted November 13, 2023 Share Posted November 13, 2023 When I was researching the Turbo Basic compiler, I kept coming upon a couple German articles about it by Frank Ostrowski, published in the Happy Computer magazine. I wondered if there was any good information in them on what works well with the compiler, and what doesn't. Turns out there was some info. on that. I decided to create English translations, using Google Translate, and making some edits, to make it sound more like how an English speaker would express things. I included some brief notes in []'s. There were two articles: Schnell, schneller, Turbo-Basic XL aus dem Compiler - This is the type-in article containing the machine code for the compiler, and the runtime. It describes how to enter these two programs, how to boot, and operate them, and gives some do's and don't's re. the code you give to the compiler. So funktioniert der Turbo-Basic-Compiler - This gives some idea of how the compiler operates on your Turbo Basic code, to convert it to machine code, including some insights on its optimizer. I'm attaching the English versions as RTFs. How The Turbo Basic Compiler works by Frank Ostrowski - English translation of Turbo-Basic-XL compiler info..rtf Turbo Basic Compiler type-in article by Frank Ostrowski - English translation of Turbo-Basic-XL compiler article.rtfd.zip 6 1 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted November 13, 2023 Share Posted November 13, 2023 @luckybuck might add the above documents to the Wiki. 1 Quote Link to comment Share on other sites More sharing options...
+Larry Posted November 13, 2023 Share Posted November 13, 2023 Interesting! I've never seen Picture 1 (title screen) of the compiler on any of the disks or ATR's that I have of the TB Compiler. Have others (especially in the U.S.)? Mine boot to Picture 2. Also, has the original article for the Interpreter been translated? I've got the article, but have not seen a direct translation. Quote Link to comment Share on other sites More sharing options...
+Larry Posted November 15, 2023 Share Posted November 15, 2023 I may as well post the original Interpreter article. Maybe someone will see it and get ambitious... turbo-basic_xl -German.pdf 1 Quote Link to comment Share on other sites More sharing options...
pirx Posted November 17, 2023 Share Posted November 17, 2023 turbo-basic_xl -English.txt turbo-basic_xl -German.txt 4 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted November 17, 2023 Share Posted November 17, 2023 4 hours ago, pirx said: turbo-basic_xl -English.txt 27.54 kB · 5 downloads turbo-basic_xl -German.txt 30.78 kB · 4 downloads "Basic, fast as the wind - with the Turbo-Basic XL interpreter" 1 Quote Link to comment Share on other sites More sharing options...
+Larry Posted November 17, 2023 Share Posted November 17, 2023 @pirx That is awesome! Thanks so much. I've had that German PDF for at least 20 years, looking for a translation. Quote Link to comment Share on other sites More sharing options...
pirx Posted November 17, 2023 Share Posted November 17, 2023 i learned german to read this article. 7 Quote Link to comment Share on other sites More sharing options...
mnemo Posted November 25, 2023 Share Posted November 25, 2023 The aforementioned scans of the interpreter and compiler articles were made by me more than 20 years ago. I cropped and aligned them as best I could and first uploaded them to my webpage as TIFF images and created the PDFs some years later. It makes me smile that they are still passed around. 🙂 Side note: The scans are from an "Atari Special Issue" of Happy Computer magazine (which I still have). The original published article of the interpreter appeared in Happy Computer issue 12/1985 (at newsstands in November 1985), which is available at archive.org (not my scan). Sadly, I don't have that issue anymore. According to that article, Frank received 2000 Deutsche Mark for the interpreter back then, which equates to about $680 at the exchange price of 1985. 2 1 Quote Link to comment Share on other sites More sharing options...
+Larry Posted November 26, 2023 Share Posted November 26, 2023 Does anyone know how the AMPEL (typing) program worked? Is it a simple checksum revealing the two low-order two digits of the sum? Quote Link to comment Share on other sites More sharing options...
mnemo Posted November 26, 2023 Share Posted November 26, 2023 (edited) 6 hours ago, Larry said: Does anyone know how the AMPEL (typing) program worked? Is it a simple checksum revealing the two low-order two digits of the sum? I always wondered that myself. I don't think they ever published the full source code to AMPEL in Happy Computer, only the known "runtime" version. Should be easy to disassemble, though. EDIT: I found an article about AMPEL 2.0 in another issue of Happy Computer, which explains the checksum calculation. Original: "Das höherwertige Byte der Zeilennummer (die ersten beiden Zahlen) multipliziert der Computer mit zwei -und addiert darauf das niederwertige Byte der Zeilennummer. Dieses Ergebnis multipliziert er erneut mit zwei. Dann addiert er der Reihe nach die acht Datenbyte hinzu, wobei er wiederum nach jeder Addition das Ergebnis verdoppelt. Nur nach dem achten Datenbyte läßt er das Ergebnis unangetastet. Von dieser Summe verwendet er nur die letzten acht Bit (eine Zahl zwischen Null und 255), die schließlich die Prüfsumme bilden." My translation: "The higher-order byte of the line number (the first two digits) are multiplied by 2 and then the lower-order byte of the line number is added. This sum is again multiplied by 2. Then it adds the eight data bytes in order, doubling the result each time. Only after the eighth data byte the sum is left unchanged. Of this sum only the lower eight bit (a number between 0 and 255) is used which is the checksum." The author of AMPEL is Henrik Fisch, by the way, an editor at Happy Computer magazine at the time. Edited November 26, 2023 by mnemo 1 3 Quote Link to comment Share on other sites More sharing options...
mnemo Posted November 26, 2023 Share Posted November 26, 2023 Here's the disassembly of the three AMPEL V1.1 machine language routines. The disassembly was done with ATR Image Explorer. The three routines are loaded from the BASIC program in order to: $0600 (page 6), ML$ BASIC string, CIO$ BASIC string. ML$ is probably the data entering and checksum routine, CIO$ is a general purpose interface to CIO calls (appending data to the file). The code at $600 is called from the ML$ and CIO$ routines that reside anywhere in memory and need an absolute address for their sub routines. Entry points are $600, $609 and $61C. Since Frank Ostrowski is listed as the author in the AMPEL 1.1 article, this code is probably from him. ; file ampel_p6.bin is 57 bytes ; Disassembly of 0600 to 0636 0600 AD 25 E4 LDA $E425 0603 48 PHA 0604 AD 24 E4 LDA $E424 0607 48 PHA 0608 60 RTS 0609 48 PHA 060A 4A LSR A 060B 4A LSR A 060C 4A LSR A 060D 4A LSR A 060E 20 14 06 JSR $0614 0611 68 PLA 0612 29 0F AND #$0F 0614 09 30 ORA #$30 0616 C9 3A CMP #$3A 0618 90 02 BCC $061C 061A 69 06 ADC #$06 061C A8 TAY 061D AD 47 03 LDA $0347 ; ICPTH ... 0620 48 PHA 0621 AD 46 03 LDA $0346 ; ICPTL PUT BYTE ROUTINE ADDRESS - 1 0624 48 PHA 0625 98 TYA 0626 60 RTS ; Data 0727 to 0739 (19 bytes) ; Table of valid keyboard codes read from CH. ; Order is 0-9, A-F, Ctrl+S, DEL 0627 32 1F 1E 1A 18 1D 1B 33 35 0630 30 3F 15 12 3A 2A 38 BE 34 00 ; file ampel_ml.bin is 261 bytes ; Disassembly of 0700 to 0803 0700 A9 00 LDA #$00 0702 85 D5 STA $D5 ; FR0+1 0704 68 PLA 0705 C9 02 CMP #$02 0707 F0 10 BEQ $0719 0709 AA TAX 070A F0 05 BEQ $0711 070C 68 PLA 070D 68 PLA 070E CA DEX 070F D0 FB BNE $070C 0711 A9 03 LDA #$03 0713 2C A9 01 BIT $01A9 0716 85 D4 STA $D4 ; FR0 0718 60 RTS 0719 68 PLA 071A 85 D7 STA $D7 ; FR0+3 071C 68 PLA 071D 85 D6 STA $D6 ; FR0+2 071F 68 PLA 0720 85 D9 STA $D9 ; FR0+5 0722 68 PLA 0723 85 D8 STA $D8 ; FR0+4 0725 18 CLC 0726 65 D6 ADC $D6 ; FR0+2 0728 85 D6 STA $D6 ; FR0+2 072A A5 D9 LDA $D9 ; FR0+5 072C 65 D7 ADC $D7 ; FR0+3 072E 85 D7 STA $D7 ; FR0+3 0730 A9 9B LDA #$9B 0732 20 1C 06 JSR $061C 0735 A5 D9 LDA $D9 ; FR0+5 0737 20 09 06 JSR $0609 073A A5 D8 LDA $D8 ; FR0+4 073C 20 09 06 JSR $0609 073F A9 3A LDA #$3A 0741 20 1C 06 JSR $061C 0744 A9 00 LDA #$00 0746 85 DA STA $DA ; FRE 0748 AD FC 02 LDA $02FC ; CH GLOBAL VARIABLE FOR KEYBOARD 074B 29 BF AND #$BF 074D A2 11 LDX #$11 074F DD 27 06 CMP $0627,X 0752 F0 05 BEQ $0759 0754 CA DEX 0755 10 F8 BPL $074F 0757 30 EF BMI $0748 0759 86 DB STX $DB ; FRE+1 075B 8D FC 02 STA $02FC ; CH GLOBAL VARIABLE FOR KEYBOARD 075E 20 00 06 JSR $0600 0761 29 7F AND #$7F 0763 20 1C 06 JSR $061C 0766 A5 DB LDA $DB ; FRE+1 0768 C9 10 CMP #$10 076A F0 A8 BEQ $0714 076C 90 28 BCC $0796 076E A5 DA LDA $DA ; FRE 0770 F0 CD BEQ $073F 0772 4A LSR A 0773 B0 05 BCS $077A 0775 A9 7E LDA #$7E 0777 20 1C 06 JSR $061C 077A A0 04 LDY #$04 077C 46 DC LSR $DC ; FRE+2 077E 66 DD ROR $DD ; FRE+3 0780 66 DE ROR $DE ; FRE+4 0782 66 DF ROR $DF ; FRE+5 0784 66 E0 ROR $E0 ; FR1 0786 66 E1 ROR $E1 ; FR1+1 0788 66 E2 ROR $E2 ; FR1+2 078A 66 E3 ROR $E3 ; FR1+3 078C 66 E4 ROR $E4 ; FR1+4 078E 88 DEY 078F D0 EB BNE $077C 0791 C6 DA DEC $DA ; FRE 0793 B8 CLV 0794 50 B2 BVC $0748 0796 0A ASL A 0797 0A ASL A 0798 0A ASL A 0799 0A ASL A 079A A0 04 LDY #$04 079C 0A ASL A 079D 26 E4 ROL $E4 ; FR1+4 079F 26 E3 ROL $E3 ; FR1+3 07A1 26 E2 ROL $E2 ; FR1+2 07A3 26 E1 ROL $E1 ; FR1+1 07A5 26 E0 ROL $E0 ; FR1 07A7 26 DF ROL $DF ; FRE+5 07A9 26 DE ROL $DE ; FRE+4 07AB 26 DD ROL $DD ; FRE+3 07AD 26 DC ROL $DC ; FRE+2 07AF 88 DEY 07B0 D0 EA BNE $079C 07B2 E6 DA INC $DA ; FRE 07B4 A5 DA LDA $DA ; FRE 07B6 C9 12 CMP #$12 07B8 F0 13 BEQ $07CD 07BA C9 10 CMP #$10 07BC D0 04 BNE $07C2 07BE A9 3C LDA #$3C 07C0 D0 05 BNE $07C7 07C2 4A LSR A 07C3 B0 CE BCS $0793 07C5 A9 20 LDA #$20 07C7 20 1C 06 JSR $061C 07CA B8 CLV 07CB 50 C6 BVC $0793 07CD A5 D9 LDA $D9 ; FR0+5 07CF 0A ASL A 07D0 65 D8 ADC $D8 ; FR0+4 07D2 0A ASL A 07D3 65 DC ADC $DC ; FRE+2 07D5 0A ASL A 07D6 65 DD ADC $DD ; FRE+3 07D8 0A ASL A 07D9 65 DE ADC $DE ; FRE+4 07DB 0A ASL A 07DC 65 DF ADC $DF ; FRE+5 07DE 0A ASL A 07DF 65 E0 ADC $E0 ; FR1 07E1 0A ASL A 07E2 65 E1 ADC $E1 ; FR1+1 07E4 0A ASL A 07E5 65 E2 ADC $E2 ; FR1+2 07E7 0A ASL A 07E8 65 E3 ADC $E3 ; FR1+3 07EA C5 E4 CMP $E4 ; FR1+4 07EC D0 12 BNE $0800 07EE A9 3E LDA #$3E 07F0 20 1C 06 JSR $061C 07F3 A0 07 LDY #$07 07F5 B9 DC 00 LDA $00DC,Y ; FRE+2 07F8 91 D6 STA ($D6),Y ; FR0+2 07FA 88 DEY 07FB 10 F8 BPL $07F5 07FD A9 00 LDA #$00 07FF 2C A9 02 BIT $02A9 ; TABMAP+6 0802 85 D4 STA $D4 ; FR0 0804 60 RTS ; file ampel_cio.bin is 83 bytes ; Disassembly of 0700 to 0750 0700 68 PLA 0701 C9 04 CMP #$04 0703 D0 42 BNE $0747 0705 68 PLA 0706 68 PLA 0707 AA TAX 0708 68 PLA 0709 68 PLA 070A 85 D4 STA $D4 ; FR0 070C 68 PLA 070D 85 D6 STA $D6 ; FR0+2 070F 68 PLA 0710 85 D5 STA $D5 ; FR0+1 0712 68 PLA 0713 85 D8 STA $D8 ; FR0+4 0715 68 PLA 0716 85 D7 STA $D7 ; FR0+3 0718 A0 86 LDY #$86 071A 8A TXA 071B C9 08 CMP #$08 071D B0 21 BCS $0740 071F 0A ASL A 0720 0A ASL A 0721 0A ASL A 0722 0A ASL A 0723 AA TAX 0724 A5 D4 LDA $D4 ; FR0 0726 9D 42 03 STA $0342,X ; ICCOM COMMAND CODE 0729 A5 D5 LDA $D5 ; FR0+1 072B 9D 44 03 STA $0344,X ; ICBAL BUFFER ADDRESS 072E A5 D6 LDA $D6 ; FR0+2 0730 9D 45 03 STA $0345,X ; ICBAH ... 0733 A5 D7 LDA $D7 ; FR0+3 0735 9D 48 03 STA $0348,X ; ICBLL BUFFER LENGTH 0738 A5 D8 LDA $D8 ; FR0+4 073A 9D 49 03 STA $0349,X ; ICBLH ... 073D 20 56 E4 JSR $E456 ; CIOV CIO ROUTINE 0740 84 D4 STY $D4 ; FR0 0742 A9 00 LDA #$00 0744 85 D5 STA $D5 ; FR0+1 0746 60 RTS 0747 A0 0A LDY #$0A 0749 AA TAX 074A F0 F4 BEQ $0740 074C 68 PLA 074D 68 PLA 074E CA DEX 074F D0 FB BNE $074C 0751 F0 ED BEQ $0740 2 Quote Link to comment Share on other sites More sharing options...
markmiller Posted November 30, 2023 Author Share Posted November 30, 2023 (edited) On 11/25/2023 at 3:16 PM, mnemo said: According to that article, Frank received 2000 Deutsche Mark for the interpreter back then, which equates to about $680 at the exchange price of 1985. In constant dollars, that comes to more than $1,900 today. I imagine the creator of Atari Basic got paid quite a bit more than that, which is why this sort of thing was so unusual. Most people wouldn't go through the effort to make a better version of a language for that kind of money. Though, I imagine Ostrowski might have made TB more for himself, and published it to make some extra money. Sometimes, the type-in stuff was really good. That was the exception, not the rule. I can think of some others from Compute! Magazine that were above the fray: - SpeedScript - a word processor. Tom Halfhill, one of the editors of Compute!, said in an interview from years ago that a vendor who advertised in the magazine got pissed with them for publishing this, because it competed with their word processor, called Quick Brown Fox. They said it cost them sales. Halfhill told them that if their word processor couldn't compete against a product that was made by a guy who wasn't experienced in writing such things, then they were the ones with the problem. - SpeedCalc - a spreadsheet - Laser Chess - a neat take on chess that actually had some longevity (originally developed on the Atari ST, and was ported to the Atari XL/XE, and others. The author submitted it for a coding contest Compute! ran, and won a cash prize for it. Though, I forget how much.) Funny thing. Whenever I think of Laser Chess, I think of this scene from The Big Bang Theory. - Crossroads - A rather famous, fast-paced shoot-em-up game on the C-64 - Screen Print - One of the last type-in listings Compute! published, but it was also one of the must useful graphics display programs I'd seen on the Atari. It could decode any Atari graphics file format I gave it. Really impressive, and it could print out a nice copy of the image on a dot matrix printer. On 11/26/2023 at 12:03 PM, mnemo said: I found an article about AMPEL 2.0 in another issue of Happy Computer, which explains the checksum calculation. I've kind of wondered how those checksum programs worked. Compute! had its own, called Automatic Proofreader, for Basic programs, and MLX for machine code. For some odd reason, the versions of Automatic Proofreader for the Apple II and C-64 were able to detect transposed characters/things out of order, but the Atari version couldn't. I thought, "Why the hell not? Is it that hard?" Funny story: Google Translate came up with "Traffic Light" for "AMPEL". I don't know if that's the name Ostrowski intended for it, but it makes sense. Edited November 30, 2023 by markmiller Quote Link to comment Share on other sites More sharing options...
markmiller Posted November 30, 2023 Author Share Posted November 30, 2023 On 11/13/2023 at 12:04 PM, Larry said: I've never seen Picture 1 (title screen) of the compiler on any of the disks or ATR's that I have of the TB Compiler. Have others (especially in the U.S.)? Mine boot to Picture 2. The splash screen comes up for me. I got my ATR from the Atari Wiki, which has an image which has the interpreter and the compiler/linker on the same disk. 1 Quote Link to comment Share on other sites More sharing options...
mnemo Posted December 17, 2023 Share Posted December 17, 2023 (edited) On 11/30/2023 at 5:40 AM, markmiller said: Funny story: Google Translate came up with "Traffic Light" for "AMPEL". I don't know if that's the name Ostrowski intended for it, but it makes sense. The name was surely intended and is an acronym in German: "Atari-Maschinen-Programm-Eingabe-Listing" (translates literally to "Atari Machine Program Input Listing"). Edited December 17, 2023 by mnemo 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.