Posted By
 sabe on 2020-02-19 10:26:56
| Turbo Rascal Syntax Error
Do you want to make Pascal programs for your Plus/4? Have you heard about the new development environment called TRSE? It's a new editor/compiler which supports Plus/4 as well. Head to https://lemonspawn.com/turbo-rascal-syntax-error-expected-but-begin/ for more details. Full source available on GitHub!
|
|
Posted By
 Csabo on 2020-02-19 10:26:56
| Re: Turbo Rascal Syntax Error
Hey, thanks for the heads up. I added it to our list of IDEs: TRSE
The last two paragraphs on the page are hilarious 
|
|
Posted By
 MMS on 2020-02-19 17:34:31
 | Re: Turbo Rascal Syntax Error

Nice. Pascal was always my fav, next to BASIC. My theme work was done in Turbo Pascal too, despite my teacher's will to make it in C
I made some trials in the past with G-Pascal, but self-runnable (compiled) code was simply not possible with that, despite pretty good commands (BTW I have the full C64 documentation if anyone needs).
This one is a nice release. Last year +4 was not listed (AFAIK) in the supported platforms, so I checked it then dropped the idea. Luckily it seems changed (thank you! to the guy supported that change!). I will definitely make a try.
PS Seems no floating/real numbers as in CC65. This is not so good for 3D, though there could be some workarounds (eg calculate with 100x bigger numbers, then at the end divide and truncate, or what)
|
|
Posted By
 bszggg on 2025-06-05 19:25:56
| Re: Turbo Rascal Syntax Error
Hi!
I wrote a program, but I need to put my code above $4000 How Can I do that?
I found a main.asm, that contains this: ' processor 6502 org $1001' but i'don't know, wow to made a prg from this.
(Need more memory than $1001-1800) Can anybody help with this? --- Update: Ok, I found this.. :) there was a -Project - Project settings - target settings - program start address :)
|
|
Posted By
 Haegar on 2025-06-06 03:20:56
| Re: Turbo Rascal Syntax Error
I think it's good that someone is getting back into TRSE on the Plus/4. I started with it a little over a year ago, but since I couldn't find enough information/descriptions, I stopped working on it.
But if there were two or three people I could talk to about it, I would get back into it because I think there's real potential for new programs for the Plus/4.
At the moment, though, I'm still tied up in other projects. After that, I'd definitely like to get back into working on the Plus/4.
|
|
Posted By
 bszggg on 2025-06-06 15:50:31
| Re: Turbo Rascal Syntax Error
@Haegar sounds good. After When I 'll finish, I plan to publish my source codes that contains some plus4 specific functions. and it contains some functions that same as the origin, but works with integer parameter, not just pointers, and some asm implementations. and mouse handling functions, etc. Maybe it'll good for somebody else.
|
|
Posted By
 bszggg on 2025-06-22 06:37:38
| Re: Turbo Rascal Syntax Error
Hi!
Do you have some ideas, how can I get, and push a string starter address to the asm X and Y resgisters? I spent with it an unsuccessfull day,
In other case, wow can I convert integer to byte?
---------- UPDATE: This will be good: fnByteVar:=Abs(lo(intVar)); // -> 16 fnByteVar2:=Abs(hi(intVar)); // -> 10 But Why?

|
|
Posted By
 bszggg on 2025-07-20 18:07:23
| Re: Turbo Rascal Syntax Error
Összeszedtem a személyes tapasztalataim a TRSE-vel kapcsolatban: (A hozzászólés módosításának jogát fenntartom, a bővítés miatt, illetve, simán lehet, hogy nem teljes a megértésem, és emiatt választottam olyan megoldást ami nem teljes vagy nem igaz. Ez személyes tapasztalatot takar, és tükrözi, hogy ezelőtt soha nem pascal-oztam)
Mielőtt belefogsz, ezt a doksit mindenképp olvasd el, és értsd meg amennyire lehet, https://lemonspawn.com/turbo-rascal-syntax-error-expected-but-begin/summary-of-trse-syntax/ mert volt olyan amivel napokat töltöttem el, mert logikus, de itt nincs implementálva!
maga a felület és a fejléesztői környezet egész jól össze van rakva.. pár hiányosság fájdalmas de megugorható a kezdeti használata. Ami fáj: - a ctrl+p -re projektet fordít.. de ez nem igaz, mert nem a main-t hanem amelyik tab-on vagy.. szóval ha kiszervezed a függvényekbe/ procedurákba a dolgaid, akkor állandóan tabozgatni kell. Ami jó: - tud komplexebb számokkal számolni, 2 bájtos számokkal, így a képleteket össze lehet legózni vele. - tudsz használni benne assembly-t, mind bemeneti adatként, amit átadsz az assembly-nek, mind kimeneti adatként is.. visszaírni trse változóba. - tudsz benne használni assembly build parancsokat. pl org $4000 és akkor ami ez utáni rész, azt oda fordítja. - be tudod állítani a fordító paramétereit a beálításokban, hogy fordítsa, és legyen -e előtte sys parancs
#TRSE
- gyk, két féle változód van, a byte, ami egy bájtos, és az integer, ami két bájtos - Bájtot integer-ré úgy tudsz konvertálni, hgy az integert létrehozod, majd megadod hogy az értéke 0 legyen, és utána hozzáadod a bájtot. - Integert bájttá konvertálni: (ha jól emlékszem, simán egyenlővé teszed, majd abs() függvényt kell hívnod rá, ha nem hívsz függvényt, nem mindig lesz sikeres) - A string az egy array of byte (null terminated, ami azt jelenti, hogy a vége után van egy $00, ami lezárja) - Mikor definiálsz egy stringet, adj meg neki akkora hosszú stringet, defult értékklnt, amekkora csak belekerülhet, mert hosszabb esetén simán felülírja később az utána levő bájtokat, amik változók.. - string lenth-jét nem tudod lekérdezni. írni kell saját függvényt, ami iterál, és kikeresi a terminate $00-t. - a lo(), és hi() ugyan bájtot ad vissza, de nem minden esetben használhatót. Ilyenkor az abs() függvénybe bele kell tenni a kapott eredményt, és az után lesz használható. - Ha string-et hozol létre, akkor alapvetően egy pointert hozol létre ami rámutat a string-re. Hogy a string valóban hol van, azt a referencia-val tudod lekérdezni: #stringneve. ez ilyenkor egy integer-t ad vissza, amit fel tudsz használni máshoz, pl poke() -hoz. - Kizárólag globális változóid vannak, mindegy hol deklarálod ezeket. - függvénybe vagy procedure-ba pointert, integert, illetve bájtot tudsz átadni, visszaadni ugyanezeket. de mivel minden változó globális, így a paraméterátadás értelmetlen. Simán építheted a programot úgy hogy bizonyos bájtokat függvényhívás előtt set-elsz, és a függvényhívás után egy adott változóban megtalálod az eredményed. Ez bug mentesebb prgit eredményez - Minden változót amit létrehozol adj neki default értéket, mert ha nem, és szemét kerül a memóriába akkor random értékkel indul a progid, és ez okozhat gondot.
| Re: Turbo Rascal Syntax Error
I’ve gathered my personal experiences with TRSE: (Note: I reserve the right to revise this post as I expand on it or realize that my understanding might be incomplete. I may have chosen solutions that aren't optimal or even correct. These reflect my own experiences—and I’d never used Pascal before this.)
Before you dive in, you absolutely must read and understand this doc as best you can: https://lemonspawn.com/turbo-rascal-syntax-error-expected-but-begin/summary-of-trse-syntax/ I wasted days on things that seemed logical but aren’t implemented in TRSE!
The interface and development environment are generally well put together… There are some painful omissions, but nothing insurmountable at the start.
What hurts: - Pressing Ctrl+P compiles the project, but that’s misleading—it compiles the current tab, not the main file. So if you’ve split your functions/procedures into separate tabs, you’ll constantly have to switch between them when compiling.
What’s great: - It supports more complex math, including 2-byte integers, so you can build your formulas freely. - You can include assembly both as input passed into ASM routines and output written back into TRSE variables. - It supports ASM build commands like org $4000, meaning it’ll compile everything after that to that memory address. - You can configure compiler parameters in the settings—whether it should include a sys call, for example.
#TRSE
- You basically have two types of variables: byte (1 byte) and integer (2 bytes). - To convert a byte to an integer, create an integer, initialize it to 0, then add the byte to it. - To convert an integer to a byte: (if I remember correctly) just assign it directly, then use abs() on it—otherwise the conversion might not work consistently. - Strings are array of byte and are null-terminated ($00 marks the end). - When defining a string, provide a default value as long as the longest data you’ll ever store. If it's too short, the excess will overwrite following bytes—which might be variables! - You can’t query string length. You’ll need to write your own function to iterate and find the $00 terminator. - lo() and hi() return byte values, but they’re not always directly usable. Wrap them in abs() to make them usable. - When you create a string, you’re actually creating a pointer to the string. To find the actual address of the string, use the reference: #stringname—it returns an integer you can use with e.g. poke(). - All variables are global, no matter where you declare them. - You can pass pointer, integer, or byte to functions/procedures—and return them as well. But since everything’s global, parameters aren’t truly necessary. It’s often easier and less buggy to pre-set certain bytes before the function call, then read the result from a specific variable afterward. - Always initialize your variables with default values! If there’s junk in memory at startup, you could get random initial values, which can cause headaches later.
|
|
|