FunkASM

Got a calculator project that you're working on, tell everyone about it
  • Author
  • Message
Offline
User avatar

add

Topic Starter

Re: HASM

Post09 November 2017, 12:42

Hey, cool!
I'm gonna take a look into the code in a bit, just wanted to say it's nice to see someone working on something here still.
Makes me happy :-D
Offline
User avatar

chickendude

Staff Member

Re: FunkASM

Post10 November 2017, 12:32

Heh that's looking pretty cool.
Offline
User avatar

NanoWar

Site Admin

Re: FunkASM

Post12 November 2017, 13:15

In case you are on Windows: I added the binary for you to play with on github: https://github.com/NanoWar/FunkCompiler ... /tag/0.1.0
Offline
User avatar

chickendude

Staff Member

Re: FunkASM

Post12 November 2017, 15:01

Cool, just downloaded it, i'll try it out tonight. Is there any sort of documentation anywhere?
Offline
User avatar

NanoWar

Site Admin

Re: FunkASM

Post12 November 2017, 16:37

What would you like to have in such a transpiler? Any ideas?
What annoys you the most in z80 asm?

For me it is
  1. variable naming/aliasing *DONE
  2. if/else without adding (annonymous) labels *DONE
  3. scope of a value (when can I reuse a register)
  4. data handling => auto increment variables (.var,), handling strings *DONE
  5. how to handle multiple return values of functions
Offline
User avatar

NanoWar

Site Admin

Re: FunkASM

Post12 November 2017, 22:28

chickendude wrote:Cool, just downloaded it, i'll try it out tonight. Is there any sort of documentation anywhere?

No documentation yet. But you probably just want to download the zip from github (I am not sure if/how compiling yourself would work) and look at the test files included. The sublime packages are cool if you want syntax highlighting, but they are work in progress. They dont actually offer so much.

Maybe someone should make a tutorial, or actually try to programm a little bit with it and see how far he comes. I tried porting a few lines of code of Tornado and I often lack operators that I would need. Like minus (lol) or most of the other basic operators. Bit shifts, flags, there is so much in z80, I dont think I can finish all. It's c++ after all and I am still quite new to that. I know about compilers, but this is just a fun side-project to learn about all that.

If I would start again today I would consider XText, Antlr, or Gold.
Offline
User avatar

chickendude

Staff Member

Re: FunkASM

Post03 December 2017, 02:50

#3 is probably one of the biggest issues for me, especially when doing things like tilemaps or in sprite routines which require you to keep track of several things at once. And i don't think i really need to return multiple values from a function very often, but even if i did i could just use multiple registers so it's not a huge deal. The other big pain is setting up variables, but there have been hacks around for that for years, i think you also released some stuff with Funk for handling declaring variables.

Lately i've been dreaming of a full-fledged z80 IDE, similar to the one BuckeyeDude was working on but with cool stuff like autocompletion for variable names, reading doc-strings, ctrl+clicking to go to the label/variable declaration, checks for which registers are used in a function, etc. I'm getting too used to IntelliJ and co...
Offline
User avatar

NanoWar

Site Admin

Re: FunkASM

Post04 December 2017, 20:48

Making an IDE from scratch is madness nowadays. I dont want to spoil it, but SublimeText3 with my Funk plugin has a little bit of that feeling. The ctrl clicking is already working! Try ctrl+clicking a label or use "Goto Definition" from the menu. Note that you can't use dots in the label or you have to select the whole label and then use goto for it to work. Apparently that is not ideal, but maybe you can make it work? It's somewhere hidden between using a custom language file https://github.com/NanoWar/z80asm-ti/bl ... tmLanguage and sublime magic on auto-detecting definitions.

Try it again maybe? https://github.com/NanoWar/z80asm-ti
It feels really close to old school asm, but with a touch of modernism :) I have Ctrl-B for build and Ctrl-E for starting wabbitemu and auto loading the program!
Offline
User avatar

chickendude

Staff Member

Re: FunkASM

Post05 December 2017, 22:55

Yeah, definitely, but it would be cool to leverage an existing tool like IntelliJ (probably way overkill) or ST3. I'm using your Sublime Text stuff (minus the Funk stuff, had some trouble setting that all up) but i don't see any options to ctrl+click to go to the label. I like using Sublime Text for z80 but i'm mostly using the syntax highlighting. Having auto-complete variables would be cool as well. add and i have been working on a fun little project together and it's been nice. Focusing on making everything more readable this time around and so far it's going pretty well, i really missed coding in z80 :)

Ah, and i like just using the terminal for git/assembling. My script assembles and sends it to TilEm2 and i used to have a macro to run it but now i just use a saved state and press enter.
Previous

Return to Announce your Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron