ilmenit Posted September 25, 2020 Share Posted September 25, 2020 5 hours ago, zbyti said: Well, so many examples are enough for start to anyone. It's time for me to dive into chess programming will you use Millfork for the chess program? Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 25, 2020 Author Share Posted September 25, 2020 (edited) @ilmenit definitely! However, during converting your landscape ASM code and checking what optimization I get I'm quite aware of the Millfork limitations compared to ASM. I will probably write the first program in Mad Pascal also, to see what I can get from @tebe work. Edited September 25, 2020 by zbyti parallel Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 30, 2020 Author Share Posted September 30, 2020 Nice to check from time to time https://github.com/KarolS/millfork/wiki/Library-feature-coverage-per-platform Quote Link to comment Share on other sites More sharing options...
zbyti Posted October 5, 2020 Author Share Posted October 5, 2020 (edited) How to play MPT music: const word ADDRMUS = $a000 const word ADDRPLA = $b000 byte stop @ ADDRPLA + $62d asm void comm(byte register(a) a, byte register(x) x, byte register(y) y) @ ADDRPLA extern asm void takt() @ ADDRPLA+3 extern void main(){ comm(0,ADDRMUS.hi,ADDRMUS.lo) comm(4,0,0) while os_CH == $ff { if antic_vcount == $10 { antic_wsync = $e gtia_colbk = $e takt() gtia_colbk = 0 } } stop = 0 } const array player @ ADDRPLA = file("data/mpt_player.obj", 6) // Music by Adam Bienias (SoTe): Bitter Reality - Partyland 1 const array music @ ADDRMUS = file("data/bitter_reality_4.mpt", 6) mptplayer.xex Edited October 5, 2020 by zbyti refactor Quote Link to comment Share on other sites More sharing options...
zbyti Posted October 5, 2020 Author Share Posted October 5, 2020 (edited) How to play CMC music: const word ADDRMUS = $a000 const word ADDRPLA = $b000 asm void comm(byte register(a) a, byte register(x) x, byte register(y) y) @ ADDRPLA+3 extern asm void takt() @ ADDRPLA+6 extern void main(){ comm($70,ADDRMUS.lo,ADDRMUS.hi) comm(0,0,0) while os_CH == $ff { if antic_vcount == $10 { antic_wsync = $e gtia_colbk = $e takt() gtia_colbk = 0 } } comm($40,0,0) } const array player @ ADDRPLA = file("data/cmc_player.rep", 6) // Music by Michal Brzezicki (Caruso) - Echo const array music @ ADDRMUS = file("data/echo.cmc", 6) cmcplayer.xex Edited October 5, 2020 by zbyti refactor Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 2, 2020 Author Share Posted December 2, 2020 0.3.24 (2020-12-02) Preliminary support for TRS-80 Model 1 and 3 running TRS-DOS. Preliminary support for Robotron Z1013. Allowed defining entry points other than the start of the segment for Atari, ZX Spectrum, CoCo, Z1013 and TRS-80. (#78) Allowed the : operator in const-pure functions. Added pointer.interrupt and pointer.kernal_interrupt types. Implemented readline and readword for VIC-20. init_rand_seed uses the POKEY on Atari. Useless labels are no longer emitted into the label file. VIC-20: added readline and readword. Atari: use POKEY for randomness source. New output format elements: ASCII string, program name. Fix: Pointers to functions with parameters (#86)/ Fix: more instances of memset loops should be detected and optimized (#59). Fix: things mentioned in the segment layout should not be deleted even if unused. Fix: endaddr+N output format. 65816: some code generation fixes. 8080: word negation now works. Various optimization improvements. Various other fixes. Improved some error messages. Even more new Atari examples (thanks to @zbyti). Build process slightly changed. https://github.com/KarolS/millfork/releases 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 11, 2020 Author Share Posted December 11, 2020 I found this instructive :] and I'll keep it here Quote Link to comment Share on other sites More sharing options...
zbyti Posted March 2, 2021 Author Share Posted March 2, 2021 (edited) New release 0.3.26 Array fields in structs Various Apple II-related improvements, including ProDOS support (thanks to @retrac0) Successful compilation now prints result program size Self-modifying assembly code is now supported (#101) Improved warnings and error messages Many bug fixes and optimizations See changelog for more details. Edited March 2, 2021 by zbyti 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 5, 2021 Author Share Posted July 5, 2021 Interesting discussion https://github.com/KarolS/millfork/issues/119 Quote Link to comment Share on other sites More sharing options...
ilmenit Posted July 5, 2021 Share Posted July 5, 2021 3 hours ago, zbyti said: Interesting discussion https://github.com/KarolS/millfork/issues/119 Yup. Millfork seems to be one of a very few true 8bit languages. Integer promotion to 16bit for arithmetic in other languages and has huge performance impact and is very hard to control either manually or by optimizer. Millfork's manual type conversion looks great, but can be confusing for users of other languages 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.