tebe Posted April 14 Author Share Posted April 14 (edited) new directive $EVAL functions supported: PI, RND, SQRT(x), SQR(x), ARCTAN2(x,y), COS(x), SIN(x), TAN(x), EXP(x), LN(x), ABS(x), INT(x), POWER(x,y), ARCTAN(x) {$eval par1[,par2],"expression"} uses crt; const width = 40; height = 30; scr = $bc40; var tab: array of word = [ {$eval HEIGHT, "scr + :1 * WIDTH" } ]; v: word; begin for v in tab do writeln(v); end. Edited April 14 by tebe 4 Quote Link to comment Share on other sites More sharing options...
zbyti Posted April 21 Share Posted April 21 great! I used to use this kind of functionality in K65 Quote Link to comment Share on other sites More sharing options...
+JAC! Posted April 21 Share Posted April 21 I have received some requests for MP and WUDSN and when trying to answer them, I found that the docs are not entirely complete/correct. Right now, I'm updating the WUDSN IDE Tools build with the latest MP (1.7.0) and MADS (2.1.5). I've forked the docs and will send a pull request with my proposal. For that, I have a question: The "-define:SYMBOL" can only mark a symbol as defined but cannot currently set its value. Is that correct? When I try to -define SYMBOL=TEST or -define SYMBOL="TEST", then SYMBOL is defined. In both cases with "SYMBOL=TEST". This makes it impossible to really use the value. When I try to -define SYMBOL=123, then SYMBOLE is considered not defined in MP. Is this really the expected behavior? It would surely be valuable to be able to set SYMBOL values (numbers and strings) from the command line. Quote Link to comment Share on other sites More sharing options...
tebe Posted April 21 Author Share Posted April 21 (edited) 3 hours ago, JAC! said: Is this really the expected behavior? It would surely be valuable to be able to set SYMBOL values (numbers and strings) from the command line. -define:symbol is equivalent {$define name} https://www.freepascal.org/docs-html/prog/progsu11.html {$define name := ......} is macro https://mads.atari8.info/doc/en/macros/#defining-a-macro Edited April 21 by tebe 1 Quote Link to comment Share on other sites More sharing options...
+JAC! Posted April 22 Share Posted April 22 I see. So symbols are really only boolean information (defined/not defined). Will document that accordingly. Quote Link to comment Share on other sites More sharing options...
TXG/MNX Posted April 25 Share Posted April 25 I cannot find the addr function. Is there a something else that I can use ? addr allows me to return the address of a variable, function or procedure. I like to read the start address of an array and print it. Quote Link to comment Share on other sites More sharing options...
TXG/MNX Posted April 25 Share Posted April 25 I think I managed it. My array name is screendata. i:=(word(@screendata)); Write(i); Did miss this one, tryed lots of things that were close to this. Quote Link to comment Share on other sites More sharing options...
tebe Posted May 18 Author Share Posted May 18 (edited) new unit: UPK (6502 unpacker for Upkr) https://github.com/pfusik/upkr6502 upk.zip Edited May 18 by tebe 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.