Jump to content

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!

Share this post


Link to post
Share on other sites

Cool, so we can have deep flies into the apple now 😊 ... if we have enough time for.

Share this post


Link to post
Share on other sites

v1.2.2

 

add signed types

Type Range Size in bytes
BYTE 0 .. 255 1
SHORTINT -128 .. 127 1
WORD 0 .. 65535 2
SMALLINT -32768 .. 32767 2
CARDINAL 0 .. 4294967295 4
INTEGER -2147483648 .. 2147483647 4
Edited by tebe
  • Like 4

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Waw!!! Wonderful, awesome stuff... Thank you, Tebe!

 

CASE will shorten conditional programming. Great new features and examples!

Share this post


Link to post
Share on other sites

WOW fastgraph is really fast. The gfx7 lines are flying around the screen ;)

 

Ok, there are some issues, as sometimes the lines are not drawn correct. Hope to get some time to adapt the asm routines, that where discussed here at atariage.

Share this post


Link to post
Share on other sites

Sieve Benchmark, CC65 vs MP (array [0..8191])

 

sieve.c -> Result hi = $600, lo = $601 ($0995 tick)

sieve.pas -> $05C2 tick

 

for array [0..255] ACTION! is similar to MP (34 tick)

 

 

sieve.zip

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

1.

any version of mads can be used ?

 

any constraints ?

(or always we need to use latest version)

 

2.

Will sqrt() function be implemented in a near future ?

Edited by devwebcl

Share this post


Link to post
Share on other sites

Yep, the size of the C output binary is huge due to used printf function. Fortunately printing to screen memory is easy on Atari without it.

Share this post


Link to post
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

Share this post


Link to post
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.

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...