CONST CR=13; LF=10; VAR A,B,C,D:INTEGER; FUNC MAX4(X1,X2,X3,X4); FUNC MAX2(X1,X2); BEGIN IF X1>X2 THEN MAX2:=X1 ELSE MAX2:=X2 END; BEGIN MAX4:=MAX2(MAX2(X1,X2),MAX2(X3,X4)) END;
Tiny Pascal Compiler - V1 NOW AVAILABLE!
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Thanks for the quick reply, it was the one on the first page where I got the .PRG files, I typed it in but think I got it right. Sorry if I didn't:
-
- Posts: 140
- Joined: Tue Jul 21, 2020 10:08 pm
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Ah - thank you!
I’ll take a look tomorrow / today… it’s just about 1am where I am, and time for bed for me!
I wasn’t aware of XVI until you mentioned it - I took a Quick Look at what you’re doing - fantastic!
VI was the first proper text editor I ever used - running on a 68K powered Bleasede Unix box at university, with BBC Micros being used as terminals! We were learning programming in Pascal at the time - this would have been 1986 I think. Happy days!
I’ll be back here when I have something to report!
Cheers
Martin
I’ll take a look tomorrow / today… it’s just about 1am where I am, and time for bed for me!
I wasn’t aware of XVI until you mentioned it - I took a Quick Look at what you’re doing - fantastic!
VI was the first proper text editor I ever used - running on a 68K powered Bleasede Unix box at university, with BBC Micros being used as terminals! We were learning programming in Pascal at the time - this would have been 1986 I think. Happy days!
I’ll be back here when I have something to report!
Cheers
Martin
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
No worries, later for me here, also! - if you're on discord you can get me there, same username. And thank you, I am not a polyglot by nature, but am looking for languages that can be supported natively on the x16 w/efficient development cycles using just PETSCII. Right now BASIC is and PASCAL (via Tiny Pascal) appear to be the primary ones. This will help me prioritize the many improvements I need to make to XVI. Thank you!
-
- Posts: 140
- Joined: Tue Jul 21, 2020 10:08 pm
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Great.
It's been a couple of months since I was working on this, so I need to find the right version - not the latest as that's not quite playing nice...
I notice that both .PRG files I posted have some issues - I wonder if I uploaded the wrong versions.
Anyway, priority #1 is to get the version 1.2 that works - both the compiler and interpreter...
THEN I'll get to work on the issue you identified. It maybe that both are related...
Cheers
Martin
It's been a couple of months since I was working on this, so I need to find the right version - not the latest as that's not quite playing nice...
I notice that both .PRG files I posted have some issues - I wonder if I uploaded the wrong versions.
Anyway, priority #1 is to get the version 1.2 that works - both the compiler and interpreter...
THEN I'll get to work on the issue you identified. It maybe that both are related...
Cheers
Martin
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Sounds great. I am super excited to see what you come up with, no pressure. It's a great companion suite along with XVI and I might finally have proper motivation to learn Pascal - at least a tiny version of it . I have list of things to do this weekend with XVI, that's really a shifting set priorities. So I will be around here and on discord.
Cheers!
Cheers!
-
- Posts: 140
- Joined: Tue Jul 21, 2020 10:08 pm
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Well, I didn't find V1.2 but I have regenerated it by fixing the bugs - some silly ones - silly enough that I remembered them from before...!
So, I'll do some testing before uploading the new files.
The Blitz compiler is not yet fully working with XC16 specific features, or some of the core features of BASIC V2. However, the state of features of the pCode interpreter does not rely on these missing features, with 3 exceptions, and there is a work-around for that - so I'll also look at having a much faster version of the interpreter up and running too. Should be fun!
Cheers
Martin
So, I'll do some testing before uploading the new files.
The Blitz compiler is not yet fully working with XC16 specific features, or some of the core features of BASIC V2. However, the state of features of the pCode interpreter does not rely on these missing features, with 3 exceptions, and there is a work-around for that - so I'll also look at having a much faster version of the interpreter up and running too. Should be fun!
Cheers
Martin
-
- Posts: 140
- Joined: Tue Jul 21, 2020 10:08 pm
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
I'm now at a position to try to replicate your issue.
Can you let me know what you were doing or trying to do in the runup to getting the error you did?
This error is usually generated when the program tries to read past the end of a file it is reading.
If I'm remembering correctly, there was a problem with that version of the compiler in correctly parsing the "END." statement that signifies the formal end of a Pascal program source.
I suspect I discovered that leaving a couple of blank lines at the end of the source file got around this and then I never came back to fix it properly. This is still the case (not fixed!).
I couldn't find the original exact version of the executable that I posted to this forum entry. I do have one very close, so I'll post that version along with the latest version of the interpreter. Hopefully that addresses those problems to your satisfaction for now.
The new versions are posted here (below) and also in the earlier original post in this thread where you downloaded them originally.
Please note that the WRITELN Pascal command is now supported by the compiler.
Cheers
Martin
Can you let me know what you were doing or trying to do in the runup to getting the error you did?
This error is usually generated when the program tries to read past the end of a file it is reading.
If I'm remembering correctly, there was a problem with that version of the compiler in correctly parsing the "END." statement that signifies the formal end of a Pascal program source.
I suspect I discovered that leaving a couple of blank lines at the end of the source file got around this and then I never came back to fix it properly. This is still the case (not fixed!).
I couldn't find the original exact version of the executable that I posted to this forum entry. I do have one very close, so I'll post that version along with the latest version of the interpreter. Hopefully that addresses those problems to your satisfaction for now.
The new versions are posted here (below) and also in the earlier original post in this thread where you downloaded them originally.
Please note that the WRITELN Pascal command is now supported by the compiler.
Cheers
Martin
- Attachments
-
- TPX16BASLOADV1.A.PRG
- Tiny Pascal Compiler V1.2.2.1
- (12.51 KiB) Downloaded 145 times
-
- TPINTERPV1.2.2.PRG
- pCode interpreter V1.2.2
- (8 KiB) Downloaded 125 times
Last edited by Martin Schmalenbach on Sat Mar 16, 2024 2:21 am, edited 2 times in total.
- ahenry3068
- Posts: 1135
- Joined: Tue Apr 04, 2023 9:57 pm
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
I suspect your problem is that CBM DOS reports EOF as soon as the last byte is read, rather than on the next read. Most systems don't report EOF until you go past that last Byte. It's pretty easy to account for though once you know what is happening.Martin Schmalenbach wrote: ↑Fri Mar 15, 2024 11:12 pm
I suspect I discovered that leaving a couple of blank lines at the end of the source file got around this and then I never came back to fix it properly. This is still the case (not fixed!).
Tony
-
- Posts: 140
- Joined: Tue Jul 21, 2020 10:08 pm
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Thanks Tony - that's EXACTLY what is happening... and when you stop and think about it - that's the best way to do it really!
I have updated / uploaded the fixed version of the compiler - V1.2.2.1 - this is in both previous posts where I had linked to the various executables.
I have updated / uploaded the fixed version of the compiler - V1.2.2.1 - this is in both previous posts where I had linked to the various executables.
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Awesome, I am eager to give this a try and will report back. May not be immediate, but it's definitely on my TO DO list. TY!Martin Schmalenbach wrote: ↑Sat Mar 16, 2024 2:15 am Thanks Tony - that's EXACTLY what is happening... and when you stop and think about it - that's the best way to do it really!
I have updated / uploaded the fixed version of the compiler - V1.2.2.1 - this is in both previous posts where I had linked to the various executables.