Alternatively, join us on Discord.

Claw development system, a multiplatform programming platform [multiplatform]

Started by DarkestEx, May 07, 2016, 05:33:29 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DJ Omnimaga

By the way, do you plan to post a list of the commands/instructions in public?

DarkestEx

Quote from: DJ Omnimaga on May 22, 2016, 04:14:59 pm
By the way, do you plan to post a list of the commands/instructions in public?

Yes, I I absolutely going to do that at some point.

I have resumed work on Claw and have had a lot of new ideas during the last time that I will be incorporating now.
But there is one thing you guys have to decide:
Is it worth porting it to the monochrome TI-84+ or not?
This would be a full rewrite, but the only Calc platform I own (or am interested in developing on/for).
Ports to the CE, and the Nspire (i think) are relatively straight forward although i will not do any of these for various reasons. Claw's reference implementation is written in C and should run on the latter two without too much changes to the core. Although the hardware specific code would have to be added
Claw is plugin based and features can be added on compilation. the most basic things like file access have to be implemented in any case.

DJ Omnimaga

A 84+ port would be nice, but I don't know if the audience is still large enough.

DarkestEx

So Claw is making progress. Slowly but I am working on it.
I just started writing the Assembler and will soon push it to GitHub as well.
I will keep you updated :)

DJ Omnimaga

Good to see progress. :) Was there a command list and documentation somewhere? I forgot. By the way I think the language should be kept simple, so we don't need to learn 100+ commands, but also high-level so it isn't as cryptic as ASM to BASIC programmers, for example.

DarkestEx

Quote from: DJ Omnimaga on July 12, 2016, 04:12:02 am
Good to see progress. :) Was there a command list and documentation somewhere? I forgot. By the way I think the language should be kept simple, so we don't need to learn 100+ commands, but also high-level so it isn't as cryptic as ASM to BASIC programmers, for example.

I am still developing a command list but most things are already figured out. While there is a very simple assembly language for claw, I will also develop a language that is similar to lua, basic and a little similar to c.
It will be quite easy, don't worry.

DJ Omnimaga

Good to hear. Also the ASM could be handy for those who are more versed into that.

DarkestEx

Quote from: DJ Omnimaga on July 12, 2016, 05:50:15 am
Good to hear. Also the ASM could be handy for those who are more versed into that.

Yea, I think so too. Also the assembler I easier to program and I need something quickly so that I can make test programs while developing the actual clawvm.

DarkestEx

Bump. So I am now writing the Claw Assembler.
This is how an example file will look like:
+CX:16 ; required, CX = executable, CL = library; 16 = 16 bit executable, 32 bit, 64 bit

; this metadata is optional and will be imported into the executable
#TITLE "Sample program"
#AUTHOR "muessigb"
#COPYRIGHT "(c) 2016 muessigb"

; this metadata is required and has to be present
#VERSION (0,1) ; version expects an array of major and minor version

+sym main ; main function, required
ldc  42 : $MYVAR ; load the constant 42 onto the stack and name it MYVAR
ldc 278 ; load the constant 278 onto the stack
addc 1034 ; add 1034 to the 278
ld $MYVAR
mul

+sym test:1 ; test function
; :0 is optional and specifies the function index but is required for callbacks and libs


What do you think?

DarkestEx

Another bump. Any suggestions or thoughts?

+CWX:16 ; required, CWX = executable, CWL = library; 16 = 16 bit executable, 32 bit, 64 bit
; everything's case insensitive

; this metadata is optional and will be imported into the executable
#TITLE "Sample program"
#AUTHOR "muessigb"
#COPYRIGHT "(c) 2016 muessigb"

; this metadata is required and has to be present
#VERSION 0:2 ; version expects an array of major and minor version

+ctv testvar 278 ; this defines a new constant testvar as 278

+sym main ; main function, required
ldc  42 ; load the constant 42 onto the stack and name it MYVAR
ldc $testvar ; load the constant from testvar onto the stack
addc 1034 ; add 1034 to the value of testvar
call test:0 ; call function test, the :0 is optional and specifies the module number

+sym test:1 ; the :1 is optional and specifies the function index but is required for libraries and callbacks
ld 1 ; load the 42 from earlier
mul ; multiplies the sum from earlier with 42
ret ; ret at the end of symbols is totally optional

DarkestEx

Bump!
Implemented the tokenizer part of the Claw assembler.
I also did some changes to the syntax where I thought it would be needed.

https://github.com/muessigb/Clawsemble

DJ Omnimaga

Wait, in those two code examples, I see stuff that looks like ASM. Will this be the most common Claw syntax? Or will it be just for those who are going for the ASM syntax?

DarkestEx

Quote from: DJ Omnimaga on July 14, 2016, 12:03:00 am
Wait, in those two code examples, I see stuff that looks like ASM. Will this be the most common Claw syntax? Or will it be just for those who are going for the ASM syntax?

That's right :)
This is claw's asm syntax that I am working on currently.
There will be a way easier language too at some point.

DJ Omnimaga

Ah ok phew, I was worried that in the end I would have to use the ASM syntax.

DarkestEx

I am making lots of progress. Currently I am implementing the preprocessor for the Claw assembler and the expression solver.

Powered by EzPortal