Page 4 of 4
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Posted: Sat Mar 16, 2024 7:42 am
by funkheld
Hi good afternoon.
Can you please describe the function of which commands are executed and how by Pascal.
Inline is also planned in Pascal.
Can you please also address system commands from FERA and VERA X and how does that work please.
Can you please also use benches 0-255?
Thanks.
greeting
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Posted: Sun Mar 17, 2024 4:52 am
by Martin Schmalenbach
Hi Funkheld!
funkheld wrote: ↑Sat Mar 16, 2024 7:42 am
Hi good afternoon.
Can you please describe the function of which commands are executed and how by Pascal.
Inline is also planned in Pascal.
Can you please also address system commands from FERA and VERA X and how does that work please.
Can you please also use benches 0-255?
Thanks.
greeting
Thanks for your message.
Let me confirm your request.
1 - You'd like something like a user guide describing what commands and functions are supported by this Tiny Pascal compiler, so that you can write your own Tiny Pascal programs. Is that right?
2 - I'm not sure what you mean by 'inline' - I'll take a guess you'd maybe like to have an inline 65C02 assembler?
3 - You'd like to know how the video & sound facilities are supported by this Tiny Pascal Compiler?
4 - I'm not clear what you are asking for here - my apologies.
Cheers
Martin
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Posted: Sun Mar 17, 2024 8:09 am
by funkheld
Hi good afternoon.
I'll just write it here:
a PDF file containing all the commands that can be executed with Pascal.
asm-inline in pascal:
ad 21 d0....... lda $d021
8d 20 d0........sta $d020
60...............rts
Using the commands from VERA and VERA FX x16 system :
use of bank 1-255
$FF20: GRAPH_init - initialize graphics
$FF23: GRAPH_clear - clear screen
$FF26: GRAPH_set_window - set clipping region
$FF29: GRAPH_set_colors - set stroke, fill and background colors
$FF2C: GRAPH_draw_line - draw a line
$FF2F: GRAPH_draw_rect - draw a rectangle (optionally filled)
$FF32: GRAPH_move_rect - move pixels
$FF35: GRAPH_draw_oval - draw an oval or circle
$FF38: GRAPH_draw_image - draw a rectangular image
$FF3B: GRAPH_set_font - set the current font
.......
......
Thanks.
greeting
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Posted: Sun Mar 17, 2024 8:00 pm
by Martin Schmalenbach
Thanks for clarifying.
I can quickly put together a pdf as you requested showing the commands, functions, syntax etc that Tiny Pascal currently supports. There are some slight differences with standard or larger Pascals.
Tiny Pascal compiles in to a simple pCode, not 6502 assembler or machine language. I plan to have it generate 6502 assembler in the future. So for now there is no inline assembly as it doesn't fit with the pCode virtual machine.
At the moment Tiny Pascal only supports 16 bit signed integers, no other data types - not chars, floats or strings. Fixing this is my current #1 development priority. With these properly supported the Tiny Pascal language becomes so much more usable in general.
It is possible to peek & poke any of the CX16's memory locations because the CX16's first 64K of memory space is mapped to the system-level MEM[] array where the array index is the memory location to read from or write to.
Supporting the VERA capabilities shouldn't be too difficult to do. It's not a #1 priority because the proper and comprehensive support of the other data types requires a major rewrite of some core parts of the compiler in terms of expression evaluation and code generation. This is likely to have a knock-on effect to other parts of the compiler and I'd rather not add to that particular workload by adding many more commands and functions. I think what I can do as a temporary measure is provide direct access to the VERA device at the register level.
Direct access to the BANK capability is possible by manipulating the MEM[] variable but given that the pCode virtual machine relies on access to the banked memory starting at $A000 it's not advised to do so for now - the running of the pCode would crash.
Cheers
Martin
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Posted: Sun Mar 17, 2024 8:34 pm
by funkheld
Hi good afternoon.
Thank you for the positive information.
I'm looking forward to further expansions.
Can you please post the command list here as a PDF?
In what language did you create the Pascal please?
Thanks.
greeting
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Posted: Sun Mar 17, 2024 11:45 pm
by Martin Schmalenbach
funkheld wrote: ↑Sun Mar 17, 2024 8:34 pm
Hi good afternoon.
Thank you for the positive information.
I'm looking forward to further expansions.
Can you please post the command list here as a PDF?
In what language did you create the Pascal please?
Thanks.
greeting
You're welcome!
I will post the pdf here once I complete it.
The language was originally written in 1978 by Kin-Mang Chung and Herbert Yuen, in North Star Basic, published in 3 consecutive editions of the BYTE magazine dated Sep, Oct & Nov 1978.
I have ported the compiler to the BASIC V2 of the C64 and CX16, and made minor changes along the way to support the different computer systems. Extensions are all mine, as are any errors and bugs!
The pCode virtual interpreter is a port from the original that was written in Tiny Pascal and published in BYTE in 1978.
It is part of my plan to create a version of the pCode interpreter in 650s assembly/machine language for speed.
Cheers
Martin
Re: Tiny Pascal Compiler - V1 NOW AVAILABLE!
Posted: Mon Mar 18, 2024 12:37 pm
by funkheld
Hello, great work and very interesting.
Thanks.
greeting