Jump to content
IGNORED

Mad Pascal


Recommended Posts

That's great to have documentation. Is there any link to actual mp sources as documentation offers instructions to compile it?

 

Btw... Already great language with many commands, directives and routines (like in Turbo Pascal or Free Pascal) and huge possibilities!

Link to comment
Share on other sites

  • 1 month later...

v1.2.8 http://mads.atari8.info

 

CASE statement (Selector -> BYTE, SHORTINT, BOOLEAN, CHAR)

UNIT, INTERFACE, IMPLEMENTATION

PROCEDURE / FUNCTION modifier: ASSEMBLER, FORWARD, OVERLOAD

PROCEDURE / FUNCTION parameters by CONSTANT, VALUE, VARIABLE

new unit FASTGRAPH, WINDOWS

new procedures / functions: CRT: ClrEol, Consol ; DOS: DosVersion ; GRAPH / FASTGRAPH: Ellipse, GetPixel, Rectangle ; MATH: ArcCos, ArcSin, Floor, FMod, Power, Tan ; SYSTEM: Abs, ArcTan, Exp, Ln, Space, StringOfChar, Sqr, Sqrt ; WINDOWS: GetTickCount

 

sin, cos more accuracy, example sin.pas

example from KyanPascal: SAMPLE1.PAS, SAMPLE2.PAS, LINES.PAS

  • Like 3
Link to comment
Share on other sites

I have fixed the C code to be less Pascal-like (using unsinged char for boolean, memset for fillchar, register for indexes etc.).

 

With an older version of cc65 (2.13.3) and optimizations turned on:

cl65 -l -o sieve.c.xex -t atari -Osir -Cl --add-source sieve.c

 

I receive:

C - 608 ticks vs Mads Pascal - 1474 ticks

For 0...255 to compare with Action! it's 14 ticks.

 

The code, xex and asm output attached.

sieve-c.zip

Edited by ilmenit
Link to comment
Share on other sites

cc65 without optimization (-Cl sieve0.c.xex) $07CE ticks (1203 bytes without PrintF)

cc65 with optimization (-Osir -Cl sieve.c.xex) $02BE ticks (934 bytes without PrintF)

 

-Cl Make local variables static

 

-O Optimize code
-Oi Optimize code, inline functions
-Or Optimize code, honour the register keyword
-Os Optimize code, inline known C funtions

sieve_cc65.zip

Edited by tebe
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...