JoSch Posted May 24, 2016 Share Posted May 24, 2016 (edited) I am glad you figured it out The fact is that Pascal is as strong as C for several years, from Turbo Pascal, Delphi and now Lazarus and Free Pascal on PC platform. Actually, in the late 80s and 90s I did a lot of Turbo Pascal and Delphi 1. But after that I moved on, because all programming languages I learned at university like Common LISP and Oberon. Yes, Oberon. Edited May 24, 2016 by JoSch Quote Link to comment Share on other sites More sharing options...
Gury Posted May 24, 2016 Share Posted May 24, 2016 Hi. Here's another small patch needed to compile blit.pas VBXE example on Linux. And static binaries (32-bit) for Linux. Mp + VBXE is... like a dream come true W. That's true It is also very close to Action! programming in some ways. But that does not mean I will ignore Action!, and Effectus will continue to be developed, but in small waves. 1 Quote Link to comment Share on other sites More sharing options...
tebe Posted June 2, 2016 Author Share Posted June 2, 2016 MadPascal 1.3.4 http://mads.atari8.info p.s. source code SV2k16 invitro (example\sv2k16\) 4 Quote Link to comment Share on other sites More sharing options...
sanny Posted June 2, 2016 Share Posted June 2, 2016 FYI, the text on the web page still says 1.3.3, but the download link seems to be 1.3.4.... Quote Link to comment Share on other sites More sharing options...
tebe Posted June 3, 2016 Author Share Posted June 3, 2016 ctrl+r (refresh) http://superuser.com/questions/220179/how-can-i-do-a-cache-refresh-in-google-chrome Quote Link to comment Share on other sites More sharing options...
greblus Posted June 3, 2016 Share Posted June 3, 2016 Hi Tebe. Looks that some directive is not yet in mads 2.0.4? res6502.asm (768) ERROR: Unknown directive .XGET Cheers, W. Quote Link to comment Share on other sites More sharing options...
tebe Posted June 3, 2016 Author Share Posted June 3, 2016 mads 2.0.5 (.xget) mads_205_b2.zip 3 Quote Link to comment Share on other sites More sharing options...
greblus Posted June 3, 2016 Share Posted June 3, 2016 4 Quote Link to comment Share on other sites More sharing options...
JoSch Posted June 6, 2016 Share Posted June 6, 2016 I really like Mad Pascal, but I have two suggestions and one issue: 1.) I really like that MP uses fixed point arithmetics for type Real, but only 8 bits for the fractional part? It's a little sparse for my taste. It tinkered a little with source code of the compiler and I could change the fractional bit count, but in the runtime there were lots of places where there should be changes that are hardcoded at moment. Would it be possible to change the runtime so, that changes are reflected, so that we can change the fraction bit count by, say, a parameter? 2.) I remember using Turbo Pascal 3 with overlays. Would it be feasible to implement a similar feature? 3.) I wanted to implement a vector and matrix library for an application, I'm thinking about. You find it here: http://github.com/josch1710/8ray. Now, when I run the program in altirra, the program outputs the values of the vector correctly, if I access them directly. But in the string conversion routine, it only gets the first two values correctly. What's going on here? Quote Link to comment Share on other sites More sharing options...
tebe Posted June 6, 2016 Author Share Posted June 6, 2016 thx, JoSch mp_fix.zip 1 Quote Link to comment Share on other sites More sharing options...
pirx Posted June 6, 2016 Share Posted June 6, 2016 (edited) 1.) I really like that MP uses fixed point arithmetics for type Real, but only 8 bits for the fractional part? It's a little sparse for my taste. In contrary to your opinion I find it absolutely gorgeous a feature in MP. Should I ever, what is highly unlikely, need more accuracy, I'd revert to system provided routines. A small lib would cover this beautifully. Edit after seeing your lib - I do understand now why you want more accuracy, indeed matrix operations will make the error grow fast. Still would stick to low bit count for speed. Edited June 6, 2016 by pirx Quote Link to comment Share on other sites More sharing options...
JoSch Posted June 6, 2016 Share Posted June 6, 2016 (edited) In contrary to your opinion I find it absolutely gorgeous a feature in MP. Should I ever, what is highly unlikely, need more accuracy, I'd revert to system provided routines. A small lib would cover this beautifully. Edit after seeing your lib - I do understand now why you want more accuracy, indeed matrix operations will make the error grow fast. Still would stick to low bit count for speed. No, I think, you got me wrong. As I already said, I really like the feature. I don't want to change the overall size of real (4 bytes). What I want to change is the fractional part, which is at the moment 8 bits, meaning the smallest fraction would be 1/256, which is about 0.004. Perhaps some other user needs a better resolution, and that's not possible at the moment. Which brings me to my sample code. This is far from a finished solution I'm far from a API freeze. I was just experimenting with Mad Pascal, when I ran into the problem, which hopefully is fixed. So, it's rather early to think about dismissing my feature request, just because my code doesn't use reals at the moment Edited June 6, 2016 by JoSch 1 Quote Link to comment Share on other sites More sharing options...
JoSch Posted June 6, 2016 Share Posted June 6, 2016 thx, JoSch I have to thank you for your excellent work. Quote Link to comment Share on other sites More sharing options...
JoSch Posted June 6, 2016 Share Posted June 6, 2016 (edited) Ok, I don't know where the bug is, but when I run my test code under Altirra with AltirraOS, then writeln of the result of the vector string conversion function, will be shown as if each space is two EOLs. With a XL ROM, everything is as supposed on one line. Edited June 6, 2016 by JoSch Quote Link to comment Share on other sites More sharing options...
JoSch Posted June 6, 2016 Share Posted June 6, 2016 @tebe: I think, I found the next bug. When I try to call v_add both vector parameters are the same value, i.e. they have both the values of the second parameter. Quote Link to comment Share on other sites More sharing options...
+Stephen Posted June 6, 2016 Share Posted June 6, 2016 Ok, I don't where the bug is, but when I run my test code under Altirra with AltirraOS, then writeln of the result of the vector string conversion function, will be shown as if each space is two EOLs. Bildschirmfoto 2016-06-06 um 21.39.09.png With a XL ROM, everything is as supposed on one line. Best to mention this to phaeron in the latest Altirra thread. Quote Link to comment Share on other sites More sharing options...
tebe Posted June 7, 2016 Author Share Posted June 7, 2016 (edited) @tebe: I think, I found the next bug. When I try to call v_add both vector parameters are the same value, i.e. they have both the values of the second parameter. result as array -> not implemented yet (string is special case) assign arrays -> not implemented yet (string is special case) solution at this time (VAR) procedure v_init2(x, y, z: smallint; var r: tvector); begin r[0] := x; r[1] := y; r[2] := z; r[3] := 1; end; begin v_init2 (3, 2, 1, x); v_init2 (6, 3, 2, y); writeln(v_tostring(x)); writeln(v_tostring(y)); end. Edited June 7, 2016 by tebe 1 Quote Link to comment Share on other sites More sharing options...
JoSch Posted June 7, 2016 Share Posted June 7, 2016 (edited) result as array -> not implemented yet (string is special case) assign arrays -> not implemented yet (string is special case) solution at this time (VAR) Ok, thanks for the workaround. Can I use pointers as parameters? This should be working, I guess. Edited June 7, 2016 by JoSch Quote Link to comment Share on other sites More sharing options...
tebe Posted June 7, 2016 Author Share Posted June 7, 2016 yes, pointers Quote Link to comment Share on other sites More sharing options...
JoSch Posted June 7, 2016 Share Posted June 7, 2016 (edited) result as array -> not implemented yet (string is special case) assign arrays -> not implemented yet (string is special case) solution at this time (VAR) procedure v_init2(x, y, z: smallint; var r: tvector); begin r[0] := x; r[1] := y; r[2] := z; r[3] := 1; end; begin v_init2 (3, 2, 1, x); v_init2 (6, 3, 2, y); writeln(v_tostring(x)); writeln(v_tostring(y)); end. Well, I didn't look closely at the workaround, but v_init actually works. What doesn't work, is v_add. It uses two tvector parameters and the second one seems to overwrite the first one. Edited June 7, 2016 by JoSch Quote Link to comment Share on other sites More sharing options...
JoSch Posted June 8, 2016 Share Posted June 8, 2016 (edited) Ok, I don't know where the bug is, but when I run my test code under Altirra with AltirraOS, then writeln of the result of the vector string conversion function, will be shown as if each space is two EOLs. Bildschirmfoto 2016-06-06 um 21.39.09.png With a XL ROM, everything is as supposed on one line. That seems to be a bug in MP. Look at that post, please: http://atariage.com/forums/topic/246939-altirra-270-released/page-24?do=findComment&comment=3527154 Edited June 8, 2016 by JoSch Quote Link to comment Share on other sites More sharing options...
tebe Posted June 12, 2016 Author Share Posted June 12, 2016 Mad Pascal 12.06.2016 - INTR replaced by GetIntVec, SetIntVec - support function RESULT as type array mp_12.06.2016.zip 3 Quote Link to comment Share on other sites More sharing options...
tebe Posted June 19, 2016 Author Share Posted June 19, 2016 v1.3.6 http://mads.atari8.info - replace INTR by GetIntVec, SetIntVec - add function RESULT as TYPE ARRAY - fix MOVE (downwards, upwards) - add ASM optimization POKE, DPOKE, PEEK, DPEEK, FILLCHAR, MOVE, INTTOREAL - SYSTEM: ParamCount, ParamStr (SDX, BWDOS) puzzle_sdx.zip 2 Quote Link to comment Share on other sites More sharing options...
JoSch Posted June 20, 2016 Share Posted June 20, 2016 There is some wrong with the implicit char to string conversion: function tostring(: integer): string; var space, temp: string; begin space := ' '; Str(i, temp); Result := concat(Result, space); { this works, space is a string } Result := concat(Result, temp); Result := concat(Result, ' '); { this doesn't work, expects string, gets char, doesn't convert } end; The single character is assigned to a string variable and gets implicitly converted. But a single character is not converted when used a parameter. I think, this should be corrected. Quote Link to comment Share on other sites More sharing options...
tebe Posted June 20, 2016 Author Share Posted June 20, 2016 Concat fix: function Concat(a,b: string): string; assembler; overload; function Concat(a: string; b: char): string; assembler; overload; function Concat(a: char; b: string): string; assembler; overload; function Concat(a,b: char): string; overload; system.zip 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.