Gury Posted June 25, 2021 Share Posted June 25, 2021 Ow, thank you, it works now. Beer awaits you 1 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4850651 Share on other sites More sharing options...
zbyti Posted June 25, 2021 Share Posted June 25, 2021 8 minutes ago, Gury said: Beer awaits you ? Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4850654 Share on other sites More sharing options...
tebe Posted June 25, 2021 Author Share Posted June 25, 2021 (edited) 5 hours ago, Gury said: Variables using Type declaration I found a strange behaviour when using type variable (array of type). Let's explain... I increment a type variable element by some value: monster[0].x := monster[0].x + 2; This code runs ok. But using a procedure, which consists of incrementing such variable, doesn't work correctly. The example works when commenting (remarking) the call to MoveMonster at the end of listing example. This is modified example from Mad Pascal repository: uses crt; type monsters = packed record x: byte ; a: cardinal; y: byte; end; var monster: array [0..3] of ^monsters; i: byte; procedure MoveMonster(p : byte); begin monster[p].x := monster[p].x + 2; end; begin for i:=0 to High(monster) do begin GetMem(monster[i], sizeof(monsters)); monster[i].x := i; monster[i].a := $ffffffff; monster[i].y := i * 2; end; for i:=0 to High(monster) do writeln(monster[i].x,',', monster[i].y); // Let's move first monster writeln(''); writeln('Let''s move first monster'); // monster[0].x := 2; monster[0].x := monster[0].x + 2; writeln(monster[0].x,',', monster[0].y); MoveMonster(0); writeln(monster[0].x,',', monster[0].y); repeat until keypressed; end. bug fixed, https://github.com/tebe6502/Mad-Pascal (master branch) Edited June 25, 2021 by tebe 2 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4850745 Share on other sites More sharing options...
tebe Posted June 25, 2021 Author Share Posted June 25, 2021 https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/graph_mode_4pp plasma speed up, foxmode_2 => foxmode_3 (INLINE) add support to procedure/function modifier INLINE 3 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4850872 Share on other sites More sharing options...
Gury Posted June 25, 2021 Share Posted June 25, 2021 3 hours ago, tebe said: bug fixed, https://github.com/tebe6502/Mad-Pascal (master branch) What a fast reply... Thanks ? +beer 1 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4850885 Share on other sites More sharing options...
Gury Posted June 26, 2021 Share Posted June 26, 2021 With such great support and addons my monsters decided not to be agressive too much. They just want some beer and conversation in good ambient to avoid hot sun. 1 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4851273 Share on other sites More sharing options...
tebe Posted June 29, 2021 Author Share Posted June 29, 2021 (edited) Github, master branch new feature, variable as REGISTER (utilized zero page, 16 bytes) var a: byte register; b: word register; be careful, the compiler also uses these areas (Fillchar, Fillbyte, Move) Edited June 29, 2021 by tebe 1 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4853388 Share on other sites More sharing options...
zbyti Posted June 29, 2021 Share Posted June 29, 2021 @tebe pleas to keep up-to-date Mad Pascal documentation :] Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4853429 Share on other sites More sharing options...
zbyti Posted June 30, 2021 Share Posted June 30, 2021 @tebe Mad Pascal documentation is way behind https://github.com/tebe6502/Mad-Pascal/blob/master/CHANGELOG Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4854156 Share on other sites More sharing options...
tebe Posted September 19, 2021 Author Share Posted September 19, 2021 (edited) https://github.com/tebe6502/Mad-Pascal http://mads.atari8.info/doc/en/index.html new features: - IRQ - TIMER1, TIMER2, TIMER4 http://mads.atari8.info/doc/en/interrupts/ - GetResourceHandle http://mads.atari8.info/doc/en/resources/ - Object: Constructor, Destructor http://mads.atari8.info/doc/en/types/#object-types - Macros http://mads.atari8.info/doc/en/macros/ Edited September 19, 2021 by tebe 4 2 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4907944 Share on other sites More sharing options...
zbyti Posted September 19, 2021 Share Posted September 19, 2021 Great work @tebe! Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4907949 Share on other sites More sharing options...
+JAC! Posted September 21, 2021 Share Posted September 21, 2021 Wow, this is the first time I see the new github style documentation. That is really awesome and good to read! The support for the players and modules as resource is also great. I tried to click the "edit on github" button to report a minor fix: "null side" instead of "zero page". But the link results in "404 - https://github.com/tebe6502/Mad-Pascal/edit/master/docs/map.md". Might of course be due to not being part of the repo... Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4909530 Share on other sites More sharing options...
tebe Posted September 21, 2021 Author Share Posted September 21, 2021 now, link is fixed, 'Edit on GitHub' works Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4909554 Share on other sites More sharing options...
tebe Posted September 21, 2021 Author Share Posted September 21, 2021 42 minutes ago, JAC! said: But the link results in "404 - https://github.com/tebe6502/Mad-Pascal/edit/master/docs/map.md". now, link is fixed, 'Edit on GitHub' works 3 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4909555 Share on other sites More sharing options...
tebe Posted September 21, 2021 Author Share Posted September 21, 2021 Tips and Tricks http://mads.atari8.info/doc/en/tips/ 2 1 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4909613 Share on other sites More sharing options...
Gury Posted September 22, 2021 Share Posted September 22, 2021 Great language and documentation. This makes Mad Pascal even stronger, there is no match for it. 4 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4910033 Share on other sites More sharing options...
tebe Posted September 22, 2021 Author Share Posted September 22, 2021 UNIT, USES http://mads.atari8.info/doc/en/units/ VARIABLES http://mads.atari8.info/doc/en/variables/ 1 1 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4910268 Share on other sites More sharing options...
Atlan_Roland Posted September 24, 2021 Share Posted September 24, 2021 (edited) Hi, i'd like to create an array of records, like this: Quote type tNPC = record ai,x,y,z: array [0..2] of byte; t: array [0..3] of byte; person: byte; dialog: byte end; var npc: array [0..7] of tNPC; which MP says it does not support: Quote Mad Pascal Compiler version 1.6.6 [2021/09/19] for 6502 Compiling City.pas City.pas (33,25) Error: Only Array [0..2] of ^RECORD supported maybe i'm missing something basic in pascal; but i couldn't figure out yet how to create an alternative datastructure that would be as easy to access and manipulate like with the example above ? ( like: write(npc[0].x[1]); ) --> sorry: yes, i missed something basic: question solved by reading this very thread: --> npc: array [0..2] of ^tNPC; just that nested arrays of records don't seem to be accessible? write(npc[0].person); -> ok write(npc[0].x[0]); -> Error: Can't read or write variables of this type Edited September 24, 2021 by Atlan_Roland question rephrased. Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4911204 Share on other sites More sharing options...
tebe Posted October 9, 2021 Author Share Posted October 9, 2021 unit ZX5 samples: https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/compression 5 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4920633 Share on other sites More sharing options...
tebe Posted October 11, 2021 Author Share Posted October 11, 2021 new syntax feature, FOR IN DO http://mads.atari8.info/doc/en/instructions/ https://www.freepascal.org/docs-html/ref/refsu59.html 4 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4922068 Share on other sites More sharing options...
danwinslow Posted October 12, 2021 Share Posted October 12, 2021 Nice. That's a great bit of syntactic sugar. This is getting to be pretty amazing. Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4922258 Share on other sites More sharing options...
Atlan_Roland Posted October 12, 2021 Share Posted October 12, 2021 17 hours ago, tebe said: new syntax feature, FOR IN DO http://mads.atari8.info/doc/en/instructions/ https://www.freepascal.org/docs-html/ref/refsu59.html hmm, just tried the example for for/in/do with your latest github master branch mp.exe. is the code not in yet? program for_in_do; var days : array [0..6] of string = ('poniedzialek', 'wtorek', 'sroda' ,'czwartek', 'piatek', 'sobota', 'niedziela'); a: string; begin for a in days do writeln(a); end. Mad Pascal Compiler version 1.6.6 [2021/10/08] for 6502 Compiling pathfinder.pas pathfinder.pas (8,6) Error: Ordinal variable expected as 'FOR' loop counter Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4922553 Share on other sites More sharing options...
tebe Posted October 12, 2021 Author Share Posted October 12, 2021 MP.EXE file was not up-to-date, files in SRC directory were updated now it has been corrected 2 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4922677 Share on other sites More sharing options...
tebe Posted October 15, 2021 Author Share Posted October 15, 2021 Example of macro in MP {$define plot(x) := scrn [x] := lookupMul[xbuf1[x] + tmp] + lookupDiv[xbuf0[x] + tmp]} mp_macro.7z 2 2 Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4924362 Share on other sites More sharing options...
zbyti Posted October 15, 2021 Share Posted October 15, 2021 @tebe well done! very nice effect! Quote Link to comment https://forums.atariage.com/topic/240919-mad-pascal/page/27/#findComment-4924369 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.