Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- |FEDCBA9876543210|FEDCBA98-76543210|
- /----------------------------------\
- |IIIIIIIIIIIIIIII|DDDDSSSS-NTTOOOOO|
- \----------------------------------/
- I: if applicable, and T < 2, operand will be stored here
- instead of in the next word (32-bits)
- D: destination; 13 = stack ptr, 14 = imm, 15 = mem
- S: source; 13 = stack ptr, 14 = imm, 15 = mem
- N: 'data is signed?'
- T: data type; 0,1,2,3 = char,short,int,float
- O: operation type
- (D and S cannot be the same value)
- brk: ?
- sys: system call
- mov: move data
- sld: load from stack offset
- sst: store to stack offset
- sph: push to stack
- spl: pull from stack
- jmp: unconditional jump
- cmp: compare data
- inc: ++D (does not alter carry at all)
- dec: --D (does not alter carry at all)
- add: D += S (automatically sets carry)
- sub: D -= S (automatically unsets carry)
- mul: D *= S
- neg: D = -D
- i2f: int-to-float cast
- f2i: float-to-int cast
- ior: inclusive or
- xor: exclusive or
- and: bitwise and
- shl: shift left
- shr: shift right
- ???
- ror: rotate right
- bcc: branch on !carry
- bcs: branch on carry
- bnc: branch on !negative
- bns: branch on negative
- bzc: branch on !zero (AKA bne, !=)
- bzs: branch on zero (AKA beq, ==)
- clc: clear carry flag
- sec: set carry flag
- comparisons:
- un/signed !=: !zero
- un/signed ==: zero
- unsigned < : !carry
- unsigned > : !zero && carry
- unsigned <=: !carry || zero
- unsigned >=: carry
- signed < : negative
- signed > : !zero && !negative
- signed <=: negative || zero
- signed >=: !negative
- keyboard input should be:
- low byte is the character, high byte are the key modifiers
- sys calls:
- cpuid (check for floats, trig functions, interrupts,
- make and model, self-modifiable code, etc.)
- trig functions
- draw point(s)
- draw box(es)
- bcd conversions (for floats too)
- create texture out of bitmap
- create texture out of rle bitmap
- create texture out of qoi data
- blit single texture
- blit single texture Ex
- render geometry
- memcpy
- memset
- rand
- set canvas resolution
- set window resolution
- set audio routine address
- misc notes:
- make sure data is aligned to 4 bytes
- audio routine should not alter hardware stack or its data
- (or make sure only 1 routine is going at once)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement