Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // all of this is pretty similar to C
- // Variable declaration
- int myvar = 0
- // function call
- foo(arg1, arg2)
- // if statement
- // one instruction
- if x == y
- z = x
- // multiple instructions
- if x == y
- then
- z = x
- x -= 2
- endif
- // loops : while ... endwhile for ... endfor loop ... endloop (with this loop, you need to use the breakloop instruction to exit the loop)
- // add a module (kind of lib)
- use module_name
- // add a asm lib
- asmlib "file.asm"
- // inline asm
- asm {
- or a, a
- sbc hl, hl
- }
- // return instruction
- return
- // variables type (I may add more in the future)
- int // 24 bits signed integer
- int16 // 16 bits signed integer
- int8 // 8 bits signed integer
- uint // 24 bits unsigned integer
- uint16 // 16 bits unsigned integer
- uint8 // 8 bits unsigned integer
- f16 // 8-16 fixed point type
- f8 // 8-8 fixed point type
- d16 // 16-16 fixed point type
- // there's also functions, but i'm still not sure about the syntax, so i won't put it here
- // eXtended Instruction Set
- // these are like the asm instructions, with more possibilities
- // there's a lot of them, so this is only a part of them
- __xis_add dest, op1, op2
- __xis_sml dest, op1, op2
- __xis_mov dest, src // this one is like ld, but with more possibilities for dest and src
- // to use a register in the xis instructions, just prefix them with % (e.g. %hl )
- // I think that's a good start, i'll add more stuff
Advertisement
Add Comment
Please, Sign In to add comment