mirror of
https://github.com/emptyynes/LIVM.git
synced 2025-01-04 23:52:25 +03:00
Add files via upload
This commit is contained in:
parent
30c49d1ff7
commit
2bed1163a6
4 changed files with 848 additions and 0 deletions
46
livm.c
Normal file
46
livm.c
Normal file
|
@ -0,0 +1,46 @@
|
|||
void* ram;
|
||||
int8_t* ram8;
|
||||
uint8_t* uram8;
|
||||
int16_t* ram16;
|
||||
uint16_t* uram16;
|
||||
int32_t* ram32;
|
||||
uint32_t* uram32;
|
||||
int64_t* ram64;
|
||||
uint64_t* uram64;
|
||||
float* ramf;
|
||||
double* ramd;
|
||||
|
||||
void createVM(uint64_t ram_size) {
|
||||
ram = (malloc(ram_size));
|
||||
ram8 = (int8_t*) ((ram));
|
||||
uram8 = (uint8_t*) ((ram));
|
||||
ram16 = (int16_t*) ((ram));
|
||||
uram16 = (uint16_t*)((ram));
|
||||
ram32 = (int32_t*) ((ram));
|
||||
uram32 = (uint32_t*)((ram));
|
||||
ram64 = (int64_t*) ((ram));
|
||||
uram64 = (uint64_t*)((ram));
|
||||
ramf = (float*) ((ram));
|
||||
ramd = (double*) ((ram));
|
||||
}
|
||||
|
||||
void deleteVM() {
|
||||
free(ram);
|
||||
}
|
||||
|
||||
void runVM() {
|
||||
register uint64_t ip = 0, sp = 0, dp = 0;
|
||||
register uint64_t op = 0;
|
||||
register uint8_t cmp = 0;
|
||||
uint64_t args[8];
|
||||
while (1) {
|
||||
op = uram64[ip++];
|
||||
args[0] = 0;
|
||||
while((args[0]++ < 6) && (uram64[ip]))
|
||||
args[args[0]] = uram64[ip++];
|
||||
switch (op) {
|
||||
#include "xcase.c"
|
||||
}
|
||||
}
|
||||
end:;
|
||||
}
|
14
main.c
Normal file
14
main.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "livm.c" // FUUUUCK
|
||||
|
||||
int main() { // FUCK FUCK FUCK, FUCK
|
||||
createVM(100); // alloc 100 bytes
|
||||
uram64[0] = 11; // poweroff opcode
|
||||
runVM(); // run this fucking fuck
|
||||
deleteVM(); // delete this shit, oh finally
|
||||
return 0; // fuck all this code
|
||||
}
|
381
opcodelist
Normal file
381
opcodelist
Normal file
|
@ -0,0 +1,381 @@
|
|||
nop
|
||||
goto
|
||||
ive
|
||||
iveselei
|
||||
saveip
|
||||
setspp
|
||||
setsp
|
||||
savesp
|
||||
setdpp
|
||||
setdp
|
||||
savedp
|
||||
poweroff
|
||||
ilsumu64
|
||||
ilsubu64
|
||||
ilmulu64
|
||||
ildivu64
|
||||
ilmodu64
|
||||
iloru64
|
||||
ilandu64
|
||||
sumu64
|
||||
subu64
|
||||
mulu64
|
||||
divu64
|
||||
modu64
|
||||
oru64
|
||||
andu64
|
||||
notu64
|
||||
ilsum64
|
||||
ilsub64
|
||||
ilmul64
|
||||
ildiv64
|
||||
ilmod64
|
||||
ilor64
|
||||
iland64
|
||||
sum64
|
||||
sub64
|
||||
mul64
|
||||
div64
|
||||
mod64
|
||||
or64
|
||||
and64
|
||||
not64
|
||||
ilsumd
|
||||
ilsubd
|
||||
ilmuld
|
||||
ildivd
|
||||
sumd
|
||||
subd
|
||||
muld
|
||||
divd
|
||||
notd
|
||||
ilsumu32
|
||||
ilsubu32
|
||||
ilmulu32
|
||||
ildivu32
|
||||
ilmodu32
|
||||
iloru32
|
||||
ilandu32
|
||||
sumu32
|
||||
subu32
|
||||
mulu32
|
||||
divu32
|
||||
modu32
|
||||
oru32
|
||||
andu32
|
||||
notu32
|
||||
ilsum32
|
||||
ilsub32
|
||||
ilmul32
|
||||
ildiv32
|
||||
ilmod32
|
||||
ilor32
|
||||
iland32
|
||||
sum32
|
||||
sub32
|
||||
mul32
|
||||
div32
|
||||
mod32
|
||||
or32
|
||||
and32
|
||||
not32
|
||||
ilsumf
|
||||
ilsubf
|
||||
ilmulf
|
||||
ildivf
|
||||
sumf
|
||||
subf
|
||||
mulf
|
||||
divf
|
||||
notf
|
||||
ilsumu16
|
||||
ilsubu16
|
||||
ilmulu16
|
||||
ildivu16
|
||||
ilmodu16
|
||||
iloru16
|
||||
ilandu16
|
||||
sumu16
|
||||
subu16
|
||||
mulu16
|
||||
divu16
|
||||
modu16
|
||||
oru16
|
||||
andu16
|
||||
notu16
|
||||
ilsum16
|
||||
ilsub16
|
||||
ilmul16
|
||||
ildiv16
|
||||
ilmod16
|
||||
ilor16
|
||||
iland16
|
||||
sum16
|
||||
sub16
|
||||
mul16
|
||||
div16
|
||||
mod16
|
||||
or16
|
||||
and16
|
||||
not16
|
||||
ilsumu8
|
||||
ilsubu8
|
||||
ilmulu8
|
||||
ildivu8
|
||||
ilmodu8
|
||||
iloru8
|
||||
ilandu8
|
||||
sumu8
|
||||
subu8
|
||||
mulu8
|
||||
divu8
|
||||
modu8
|
||||
oru8
|
||||
andu8
|
||||
notu8
|
||||
ilsum8
|
||||
ilsub8
|
||||
ilmul8
|
||||
ildiv8
|
||||
ilmod8
|
||||
ilor8
|
||||
iland8
|
||||
sum8
|
||||
sub8
|
||||
mul8
|
||||
div8
|
||||
mod8
|
||||
or8
|
||||
and8
|
||||
not8
|
||||
eq
|
||||
equ64
|
||||
eq64
|
||||
eqd
|
||||
equ32
|
||||
eq32
|
||||
eqf
|
||||
equ16
|
||||
eq16
|
||||
equ8
|
||||
eq8
|
||||
nequ64
|
||||
neq64
|
||||
neqd
|
||||
nequ32
|
||||
neq32
|
||||
neqf
|
||||
nequ16
|
||||
neq16
|
||||
nequ8
|
||||
neq8
|
||||
gtu64
|
||||
gt64
|
||||
gtd
|
||||
gtu32
|
||||
gt32
|
||||
gtf
|
||||
gtu16
|
||||
gt16
|
||||
gtu8
|
||||
gt8
|
||||
ltu64
|
||||
lt64
|
||||
ltd
|
||||
ltu32
|
||||
lt32
|
||||
ltf
|
||||
ltu16
|
||||
lt16
|
||||
ltu8
|
||||
lt8
|
||||
gqu64
|
||||
gq64
|
||||
gqd
|
||||
gqu32
|
||||
gq32
|
||||
gqf
|
||||
gqu16
|
||||
gq16
|
||||
gqu8
|
||||
gq8
|
||||
lqu64
|
||||
lq64
|
||||
lqd
|
||||
lqu32
|
||||
lq32
|
||||
lqf
|
||||
lqu16
|
||||
lq16
|
||||
lqu8
|
||||
lq8
|
||||
incu64
|
||||
inc64
|
||||
incd
|
||||
incu32
|
||||
inc32
|
||||
incf
|
||||
incu16
|
||||
inc16
|
||||
incu8
|
||||
inc8
|
||||
decu64
|
||||
dec64
|
||||
decd
|
||||
decu32
|
||||
dec32
|
||||
decf
|
||||
decu16
|
||||
dec16
|
||||
decu8
|
||||
dec8
|
||||
setcu64
|
||||
setc64
|
||||
setcd
|
||||
setcu32
|
||||
setc32
|
||||
setcf
|
||||
setcu16
|
||||
setc16
|
||||
setcu8
|
||||
setc8
|
||||
setvu64
|
||||
setv64
|
||||
setvd
|
||||
setvu32
|
||||
setv32
|
||||
setvf
|
||||
setvu16
|
||||
setv16
|
||||
setvu8
|
||||
setv8
|
||||
setpu64
|
||||
setp64
|
||||
setpd
|
||||
setpu32
|
||||
setp32
|
||||
setpf
|
||||
setpu16
|
||||
setp16
|
||||
setpu8
|
||||
setp8
|
||||
psetcu64
|
||||
psetc64
|
||||
psetcd
|
||||
psetcu32
|
||||
psetc32
|
||||
psetcf
|
||||
psetcu16
|
||||
psetc16
|
||||
psetcu8
|
||||
psetc8
|
||||
psetvu64
|
||||
psetv64
|
||||
psetvd
|
||||
psetvu32
|
||||
psetv32
|
||||
psetvf
|
||||
psetvu16
|
||||
psetv16
|
||||
psetvu8
|
||||
psetv8
|
||||
psetpu64
|
||||
psetp64
|
||||
psetpd
|
||||
psetpu32
|
||||
psetp32
|
||||
psetpf
|
||||
psetpu16
|
||||
psetp16
|
||||
psetpu8
|
||||
psetp8
|
||||
u64to64
|
||||
u64tod
|
||||
u64tou32
|
||||
u64to32
|
||||
u64tof
|
||||
u64tou16
|
||||
u64to16
|
||||
u64tou8
|
||||
u64to8
|
||||
64tou64
|
||||
64tod
|
||||
64tou32
|
||||
64to32
|
||||
64tof
|
||||
64tou16
|
||||
64to16
|
||||
64tou8
|
||||
64to8
|
||||
dtou64
|
||||
dto64
|
||||
dtou32
|
||||
dto32
|
||||
dtof
|
||||
dtou16
|
||||
dto16
|
||||
dtou8
|
||||
dto8
|
||||
u32to64
|
||||
u32tou64
|
||||
u32tod
|
||||
u32to32
|
||||
u32tof
|
||||
u32tou16
|
||||
u32to16
|
||||
u32tou8
|
||||
u32to8
|
||||
32to64
|
||||
32tou64
|
||||
32tod
|
||||
32tou32
|
||||
32tof
|
||||
32tou16
|
||||
32to16
|
||||
32tou8
|
||||
32to8
|
||||
ftou64
|
||||
fto64
|
||||
ftod
|
||||
ftou32
|
||||
fto32
|
||||
ftou16
|
||||
fto16
|
||||
ftou8
|
||||
fto8
|
||||
u16tou64
|
||||
u16to64
|
||||
u16tod
|
||||
u16tou32
|
||||
u16to32
|
||||
u16tof
|
||||
u16to16
|
||||
u16tou8
|
||||
u16to8
|
||||
16tou64
|
||||
16to64
|
||||
16tod
|
||||
16tou32
|
||||
16to32
|
||||
16tof
|
||||
16tou16
|
||||
16tou8
|
||||
16to8
|
||||
u8tou64
|
||||
u8to64
|
||||
u8tod
|
||||
u8tou32
|
||||
u8to32
|
||||
u8tof
|
||||
u8tou16
|
||||
u8to16
|
||||
u8to8
|
||||
8tou64
|
||||
8to64
|
||||
8tod
|
||||
8tou32
|
||||
8to32
|
||||
8tof
|
||||
8tou16
|
||||
8to16
|
||||
8tou8
|
407
xcase.c
Normal file
407
xcase.c
Normal file
|
@ -0,0 +1,407 @@
|
|||
// control
|
||||
case 0: break;
|
||||
case 1: ip = args[1]; break;
|
||||
case 2: ip = cmp * args[1]; break; // if
|
||||
case 3: ip = cmp * args[1] + (1 - cmp) * args[2]; break; // if-else
|
||||
case 4: uram64[args[1]] = ip; break;
|
||||
case 5: sp = uram64[args[1]]; break;
|
||||
case 6: sp = args[1]; break;
|
||||
case 7: uram64[args[1]] = sp; break;
|
||||
case 8: dp = uram64[args[1]]; break;
|
||||
case 9: dp = args[1]; break;
|
||||
case 10: uram64[args[1]] = dp; break;
|
||||
case 11: goto end; break;
|
||||
// math
|
||||
// u64
|
||||
case 12: uram64[args[1]] += uram64[args[2]]; break;
|
||||
case 13: uram64[args[1]] -= uram64[args[2]]; break;
|
||||
case 14: uram64[args[1]] *= uram64[args[2]]; break;
|
||||
case 15: uram64[args[1]] /= uram64[args[2]]; break;
|
||||
case 16: uram64[args[1]] %= uram64[args[2]]; break;
|
||||
case 17: uram64[args[1]] |= uram64[args[2]]; break;
|
||||
case 18: uram64[args[1]] &= uram64[args[2]]; break;
|
||||
case 19: uram64[args[1]] = uram64[args[2]] + uram64[args[3]]; break;
|
||||
case 20: uram64[args[1]] = uram64[args[2]] - uram64[args[3]]; break;
|
||||
case 21: uram64[args[1]] = uram64[args[2]] * uram64[args[3]]; break;
|
||||
case 22: uram64[args[1]] = uram64[args[2]] / uram64[args[3]]; break;
|
||||
case 23: uram64[args[1]] = uram64[args[2]] % uram64[args[3]]; break;
|
||||
case 24: uram64[args[1]] = uram64[args[2]] | uram64[args[3]]; break;
|
||||
case 25: uram64[args[1]] = uram64[args[2]] & uram64[args[3]]; break;
|
||||
case 26: uram64[args[1]] = !uram64[args[2]]; break;
|
||||
// 64
|
||||
case 27: ram64[args[1]] += ram64[args[2]]; break;
|
||||
case 28: ram64[args[1]] -= ram64[args[2]]; break;
|
||||
case 29: ram64[args[1]] *= ram64[args[2]]; break;
|
||||
case 30: ram64[args[1]] /= ram64[args[2]]; break;
|
||||
case 31: ram64[args[1]] %= ram64[args[2]]; break;
|
||||
case 32: ram64[args[1]] |= ram64[args[2]]; break;
|
||||
case 33: ram64[args[1]] &= ram64[args[2]]; break;
|
||||
case 34: ram64[args[1]] = ram64[args[2]] + ram64[args[3]]; break;
|
||||
case 35: ram64[args[1]] = ram64[args[2]] - ram64[args[3]]; break;
|
||||
case 36: ram64[args[1]] = ram64[args[2]] * ram64[args[3]]; break;
|
||||
case 37: ram64[args[1]] = ram64[args[2]] / ram64[args[3]]; break;
|
||||
case 38: ram64[args[1]] = ram64[args[2]] % ram64[args[3]]; break;
|
||||
case 39: ram64[args[1]] = ram64[args[2]] | ram64[args[3]]; break;
|
||||
case 40: ram64[args[1]] = ram64[args[2]] & ram64[args[3]]; break;
|
||||
case 41: ram64[args[1]] = !ram64[args[2]]; break;
|
||||
// d
|
||||
case 42: ramd[args[1]] += ramd[args[2]]; break;
|
||||
case 43: ramd[args[1]] -= ramd[args[2]]; break;
|
||||
case 44: ramd[args[1]] *= ramd[args[2]]; break;
|
||||
case 45: ramd[args[1]] /= ramd[args[2]]; break;
|
||||
case 46: ramd[args[1]] = ramd[args[2]] + ramd[args[3]]; break;
|
||||
case 47: ramd[args[1]] = ramd[args[2]] - ramd[args[3]]; break;
|
||||
case 48: ramd[args[1]] = ramd[args[2]] * ramd[args[3]]; break;
|
||||
case 49: ramd[args[1]] = ramd[args[2]] / ramd[args[3]]; break;
|
||||
case 50: ramd[args[1]] = !ramd[args[2]]; break;
|
||||
// u32
|
||||
case 51: uram32[args[1]] += uram32[args[2]]; break;
|
||||
case 52: uram32[args[1]] -= uram32[args[2]]; break;
|
||||
case 53: uram32[args[1]] *= uram32[args[2]]; break;
|
||||
case 54: uram32[args[1]] /= uram32[args[2]]; break;
|
||||
case 55: uram32[args[1]] %= uram32[args[2]]; break;
|
||||
case 56: uram32[args[1]] |= uram32[args[2]]; break;
|
||||
case 57: uram32[args[1]] &= uram32[args[2]]; break;
|
||||
case 58: uram32[args[1]] = uram32[args[2]] + uram32[args[3]]; break;
|
||||
case 59: uram32[args[1]] = uram32[args[2]] - uram32[args[3]]; break;
|
||||
case 60: uram32[args[1]] = uram32[args[2]] * uram32[args[3]]; break;
|
||||
case 61: uram32[args[1]] = uram32[args[2]] / uram32[args[3]]; break;
|
||||
case 62: uram32[args[1]] = uram32[args[2]] % uram32[args[3]]; break;
|
||||
case 63: uram32[args[1]] = uram32[args[2]] | uram32[args[3]]; break;
|
||||
case 64: uram32[args[1]] = uram32[args[2]] & uram32[args[3]]; break;
|
||||
case 65: uram32[args[1]] = !uram32[args[2]]; break;
|
||||
// 32
|
||||
case 66: ram32[args[1]] += ram32[args[2]]; break;
|
||||
case 67: ram32[args[1]] -= ram32[args[2]]; break;
|
||||
case 68: ram32[args[1]] *= ram32[args[2]]; break;
|
||||
case 69: ram32[args[1]] /= ram32[args[2]]; break;
|
||||
case 70: ram32[args[1]] %= ram32[args[2]]; break;
|
||||
case 71: ram32[args[1]] |= ram32[args[2]]; break;
|
||||
case 72: ram32[args[1]] &= ram32[args[2]]; break;
|
||||
case 73: ram32[args[1]] = ram32[args[2]] + ram32[args[3]]; break;
|
||||
case 74: ram32[args[1]] = ram32[args[2]] - ram32[args[3]]; break;
|
||||
case 75: ram32[args[1]] = ram32[args[2]] * ram32[args[3]]; break;
|
||||
case 76: ram32[args[1]] = ram32[args[2]] / ram32[args[3]]; break;
|
||||
case 77: ram32[args[1]] = ram32[args[2]] % ram32[args[3]]; break;
|
||||
case 78: ram32[args[1]] = ram32[args[2]] | ram32[args[3]]; break;
|
||||
case 79: ram32[args[1]] = ram32[args[2]] & ram32[args[3]]; break;
|
||||
case 80: ram32[args[1]] = !ram32[args[2]]; break;
|
||||
// f
|
||||
case 81: ramf[args[1]] += ramf[args[2]]; break;
|
||||
case 82: ramf[args[1]] -= ramf[args[2]]; break;
|
||||
case 83: ramf[args[1]] *= ramf[args[2]]; break;
|
||||
case 84: ramf[args[1]] /= ramf[args[2]]; break;
|
||||
case 85: ramf[args[1]] = ramf[args[2]] + ramf[args[3]]; break;
|
||||
case 86: ramf[args[1]] = ramf[args[2]] - ramf[args[3]]; break;
|
||||
case 87: ramf[args[1]] = ramf[args[2]] * ramf[args[3]]; break;
|
||||
case 88: ramf[args[1]] = ramf[args[2]] / ramf[args[3]]; break;
|
||||
case 89: ramf[args[1]] = !ramf[args[2]]; break;
|
||||
// u16
|
||||
case 90: uram16[args[1]] += uram16[args[2]]; break;
|
||||
case 91: uram16[args[1]] -= uram16[args[2]]; break;
|
||||
case 92: uram16[args[1]] *= uram16[args[2]]; break;
|
||||
case 93: uram16[args[1]] /= uram16[args[2]]; break;
|
||||
case 94: uram16[args[1]] %= uram16[args[2]]; break;
|
||||
case 95: uram16[args[1]] |= uram16[args[2]]; break;
|
||||
case 96: uram16[args[1]] &= uram16[args[2]]; break;
|
||||
case 97: uram16[args[1]] = uram16[args[2]] + uram16[args[3]]; break;
|
||||
case 98: uram16[args[1]] = uram16[args[2]] - uram16[args[3]]; break;
|
||||
case 99: uram16[args[1]] = uram16[args[2]] * uram16[args[3]]; break;
|
||||
case 100: uram16[args[1]] = uram16[args[2]] / uram16[args[3]]; break;
|
||||
case 101: uram16[args[1]] = uram16[args[2]] % uram16[args[3]]; break;
|
||||
case 102: uram16[args[1]] = uram16[args[2]] | uram16[args[3]]; break;
|
||||
case 103: uram16[args[1]] = uram16[args[2]] & uram16[args[3]]; break;
|
||||
case 104: uram16[args[1]] = !uram16[args[2]]; break;
|
||||
// 16
|
||||
case 105: ram16[args[1]] += ram16[args[2]]; break;
|
||||
case 106: ram16[args[1]] -= ram16[args[2]]; break;
|
||||
case 107: ram16[args[1]] *= ram16[args[2]]; break;
|
||||
case 108: ram16[args[1]] /= ram16[args[2]]; break;
|
||||
case 109: ram16[args[1]] %= ram16[args[2]]; break;
|
||||
case 110: ram16[args[1]] |= ram16[args[2]]; break;
|
||||
case 111: ram16[args[1]] &= ram16[args[2]]; break;
|
||||
case 112: ram16[args[1]] = ram16[args[2]] + ram16[args[3]]; break;
|
||||
case 113: ram16[args[1]] = ram16[args[2]] - ram16[args[3]]; break;
|
||||
case 114: ram16[args[1]] = ram16[args[2]] * ram16[args[3]]; break;
|
||||
case 115: ram16[args[1]] = ram16[args[2]] / ram16[args[3]]; break;
|
||||
case 116: ram16[args[1]] = ram16[args[2]] % ram16[args[3]]; break;
|
||||
case 117: ram16[args[1]] = ram16[args[2]] | ram16[args[3]]; break;
|
||||
case 118: ram16[args[1]] = ram16[args[2]] & ram16[args[3]]; break;
|
||||
case 119: ram16[args[1]] = !ram16[args[2]]; break;
|
||||
// u8
|
||||
case 120: uram8[args[1]] += uram8[args[2]]; break;
|
||||
case 121: uram8[args[1]] -= uram8[args[2]]; break;
|
||||
case 122: uram8[args[1]] *= uram8[args[2]]; break;
|
||||
case 123: uram8[args[1]] /= uram8[args[2]]; break;
|
||||
case 124: uram8[args[1]] %= uram8[args[2]]; break;
|
||||
case 125: uram8[args[1]] |= uram8[args[2]]; break;
|
||||
case 126: uram8[args[1]] &= uram8[args[2]]; break;
|
||||
case 127: uram8[args[1]] = uram8[args[2]] + uram8[args[3]]; break;
|
||||
case 128: uram8[args[1]] = uram8[args[2]] - uram8[args[3]]; break;
|
||||
case 129: uram8[args[1]] = uram8[args[2]] * uram8[args[3]]; break;
|
||||
case 130: uram8[args[1]] = uram8[args[2]] / uram8[args[3]]; break;
|
||||
case 131: uram8[args[1]] = uram8[args[2]] % uram8[args[3]]; break;
|
||||
case 132: uram8[args[1]] = uram8[args[2]] | uram8[args[3]]; break;
|
||||
case 133: uram8[args[1]] = uram8[args[2]] & uram8[args[3]]; break;
|
||||
case 134: uram8[args[1]] = !uram8[args[2]]; break;
|
||||
// 8
|
||||
case 135: ram8[args[1]] += ram8[args[2]]; break;
|
||||
case 136: ram8[args[1]] -= ram8[args[2]]; break;
|
||||
case 137: ram8[args[1]] *= ram8[args[2]]; break;
|
||||
case 138: ram8[args[1]] /= ram8[args[2]]; break;
|
||||
case 139: ram8[args[1]] %= ram8[args[2]]; break;
|
||||
case 140: ram8[args[1]] |= ram8[args[2]]; break;
|
||||
case 141: ram8[args[1]] &= ram8[args[2]]; break;
|
||||
case 142: ram8[args[1]] = ram8[args[2]] + ram8[args[3]]; break;
|
||||
case 143: ram8[args[1]] = ram8[args[2]] - ram8[args[3]]; break;
|
||||
case 144: ram8[args[1]] = ram8[args[2]] * ram8[args[3]]; break;
|
||||
case 145: ram8[args[1]] = ram8[args[2]] / ram8[args[3]]; break;
|
||||
case 146: ram8[args[1]] = ram8[args[2]] % ram8[args[3]]; break;
|
||||
case 147: ram8[args[1]] = ram8[args[2]] | ram8[args[3]]; break;
|
||||
case 148: ram8[args[1]] = ram8[args[2]] & ram8[args[3]]; break;
|
||||
case 149: ram8[args[1]] = !ram8[args[2]]; break;
|
||||
// ==
|
||||
case 150: cmp = uram64[args[1]] == uram64[args[2]]; break;
|
||||
case 151: cmp = ram64[args[1]] == ram64[args[2]]; break;
|
||||
case 152: cmp = ramd[args[1]] == ramd[args[2]]; break;
|
||||
case 153: cmp = uram32[args[1]] == uram32[args[2]]; break;
|
||||
case 154: cmp = ram32[args[1]] == ram32[args[2]]; break;
|
||||
case 155: cmp = ramf[args[1]] == ramf[args[2]]; break;
|
||||
case 156: cmp = uram16[args[1]] == uram16[args[2]]; break;
|
||||
case 157: cmp = ram16[args[1]] == ram16[args[2]]; break;
|
||||
case 158: cmp = uram8[args[1]] == uram8[args[2]]; break;
|
||||
case 159: cmp = ram8[args[1]] == ram8[args[2]]; break;
|
||||
// !=
|
||||
case 160: cmp = uram64[args[1]] != uram64[args[2]]; break;
|
||||
case 161: cmp = ram64[args[1]] != ram64[args[2]]; break;
|
||||
case 162: cmp = ramd[args[1]] != ramd[args[2]]; break;
|
||||
case 163: cmp = uram32[args[1]] != uram32[args[2]]; break;
|
||||
case 164: cmp = ram32[args[1]] != ram32[args[2]]; break;
|
||||
case 165: cmp = ramf[args[1]] != ramf[args[2]]; break;
|
||||
case 166: cmp = uram16[args[1]] != uram16[args[2]]; break;
|
||||
case 167: cmp = ram16[args[1]] != ram16[args[2]]; break;
|
||||
case 168: cmp = uram8[args[1]] != uram8[args[2]]; break;
|
||||
case 169: cmp = ram8[args[1]] != ram8[args[2]]; break;
|
||||
// >
|
||||
case 170: cmp = uram64[args[1]] > uram64[args[2]]; break;
|
||||
case 171: cmp = ram64[args[1]] > ram64[args[2]]; break;
|
||||
case 172: cmp = ramd[args[1]] > ramd[args[2]]; break;
|
||||
case 173: cmp = uram32[args[1]] > uram32[args[2]]; break;
|
||||
case 174: cmp = ram32[args[1]] > ram32[args[2]]; break;
|
||||
case 175: cmp = ramf[args[1]] > ramf[args[2]]; break;
|
||||
case 176: cmp = uram16[args[1]] > uram16[args[2]]; break;
|
||||
case 177: cmp = ram16[args[1]] > ram16[args[2]]; break;
|
||||
case 178: cmp = uram8[args[1]] > uram8[args[2]]; break;
|
||||
case 179: cmp = ram8[args[1]] > ram8[args[2]]; break;
|
||||
// <
|
||||
case 180: cmp = uram64[args[1]] < uram64[args[2]]; break;
|
||||
case 181: cmp = ram64[args[1]] < ram64[args[2]]; break;
|
||||
case 182: cmp = ramd[args[1]] < ramd[args[2]]; break;
|
||||
case 183: cmp = uram32[args[1]] < uram32[args[2]]; break;
|
||||
case 184: cmp = ram32[args[1]] < ram32[args[2]]; break;
|
||||
case 185: cmp = ramf[args[1]] < ramf[args[2]]; break;
|
||||
case 186: cmp = uram16[args[1]] < uram16[args[2]]; break;
|
||||
case 187: cmp = ram16[args[1]] < ram16[args[2]]; break;
|
||||
case 188: cmp = uram8[args[1]] < uram8[args[2]]; break;
|
||||
case 189: cmp = ram8[args[1]] < ram8[args[2]]; break;
|
||||
// >=
|
||||
case 190: cmp = uram64[args[1]] >= uram64[args[2]]; break;
|
||||
case 191: cmp = ram64[args[1]] >= ram64[args[2]]; break;
|
||||
case 192: cmp = ramd[args[1]] >= ramd[args[2]]; break;
|
||||
case 193: cmp = uram32[args[1]] >= uram32[args[2]]; break;
|
||||
case 194: cmp = ram32[args[1]] >= ram32[args[2]]; break;
|
||||
case 195: cmp = ramf[args[1]] >= ramf[args[2]]; break;
|
||||
case 196: cmp = uram16[args[1]] >= uram16[args[2]]; break;
|
||||
case 197: cmp = ram16[args[1]] >= ram16[args[2]]; break;
|
||||
case 198: cmp = uram8[args[1]] >= uram8[args[2]]; break;
|
||||
case 199: cmp = ram8[args[1]] >= ram8[args[2]]; break;
|
||||
// <=
|
||||
case 200: cmp = uram64[args[1]] <= uram64[args[2]]; break;
|
||||
case 201: cmp = ram64[args[1]] <= ram64[args[2]]; break;
|
||||
case 202: cmp = ramd[args[1]] <= ramd[args[2]]; break;
|
||||
case 203: cmp = uram32[args[1]] <= uram32[args[2]]; break;
|
||||
case 204: cmp = ram32[args[1]] <= ram32[args[2]]; break;
|
||||
case 205: cmp = ramf[args[1]] <= ramf[args[2]]; break;
|
||||
case 206: cmp = uram16[args[1]] <= uram16[args[2]]; break;
|
||||
case 207: cmp = ram16[args[1]] <= ram16[args[2]]; break;
|
||||
case 208: cmp = uram8[args[1]] <= uram8[args[2]]; break;
|
||||
case 209: cmp = ram8[args[1]] <= ram8[args[2]]; break;
|
||||
// ++
|
||||
case 210: uram64[args[1]]++; break;
|
||||
case 211: ram64[args[1]]++; break;
|
||||
case 212: ramd[args[1]]++; break;
|
||||
case 213: uram32[args[1]]++; break;
|
||||
case 214: ram32[args[1]]++; break;
|
||||
case 215: ramf[args[1]]++; break;
|
||||
case 216: uram16[args[1]]++; break;
|
||||
case 217: ram16[args[1]]++; break;
|
||||
case 218: uram8[args[1]]++; break;
|
||||
case 219: ram8[args[1]]++; break;
|
||||
// --
|
||||
case 220: uram64[args[1]]--; break;
|
||||
case 221: ram64[args[1]]--; break;
|
||||
case 222: ramd[args[1]]--; break;
|
||||
case 223: uram32[args[1]]--; break;
|
||||
case 224: ram32[args[1]]--; break;
|
||||
case 225: ramf[args[1]]--; break;
|
||||
case 226: uram16[args[1]]--; break;
|
||||
case 227: ram16[args[1]]--; break;
|
||||
case 228: uram8[args[1]]--; break;
|
||||
case 229: ram8[args[1]]--; break;
|
||||
// a = b
|
||||
case 230: uram64[args[1]] = (uint64_t)args[2]; break;
|
||||
case 231: ram64[args[1]] = (int64_t)args[2]; break;
|
||||
case 232: ramd[args[1]] = (int64_t)args[2]; break;
|
||||
case 233: uram32[args[1]] = (uint32_t)args[2]; break;
|
||||
case 234: ram32[args[1]] = (int32_t)args[2]; break;
|
||||
case 235: ramf[args[1]] = (int32_t)args[2]; break;
|
||||
case 236: uram16[args[1]] = (uint16_t)args[2]; break;
|
||||
case 237: ram16[args[1]] = (int16_t)args[2]; break;
|
||||
case 238: uram8[args[1]] = (uint8_t)args[2]; break;
|
||||
case 239: ram8[args[1]] = (int8_t)args[2]; break;
|
||||
// a = *b
|
||||
case 240: uram64[args[1]] = uram64[args[2]]; break;
|
||||
case 241: ram64[args[1]] = ram64[args[2]]; break;
|
||||
case 242: ramd[args[1]] = ramd[args[2]]; break;
|
||||
case 243: uram32[args[1]] = uram32[args[2]]; break;
|
||||
case 244: ram32[args[1]] = ram32[args[2]]; break;
|
||||
case 245: ramf[args[1]] = ramf[args[2]]; break;
|
||||
case 246: uram16[args[1]] = uram16[args[2]]; break;
|
||||
case 247: ram16[args[1]] = ram16[args[2]]; break;
|
||||
case 248: uram8[args[1]] = uram8[args[2]]; break;
|
||||
case 249: ram8[args[1]] = ram8[args[2]]; break;
|
||||
// a = **b
|
||||
case 250: uram64[args[1]] = uram64[uram64[args[2]]]; break;
|
||||
case 251: ram64[args[1]] = ram64[uram64[args[2]]]; break;
|
||||
case 252: ramd[args[1]] = ramd[uram64[args[2]]]; break;
|
||||
case 253: uram32[args[1]] = uram32[uram64[args[2]]]; break;
|
||||
case 254: ram32[args[1]] = ram32[uram64[args[2]]]; break;
|
||||
case 255: ramf[args[1]] = ramf[uram64[args[2]]]; break;
|
||||
case 256: uram16[args[1]] = uram16[uram64[args[2]]]; break;
|
||||
case 257: ram16[args[1]] = ram16[uram64[args[2]]]; break;
|
||||
case 258: uram8[args[1]] = uram8[uram64[args[2]]]; break;
|
||||
case 259: ram8[args[1]] = ram8[uram64[args[2]]]; break;
|
||||
// **a = b
|
||||
case 260: uram64[uram64[args[1]]] = (uint64_t) args[2]; break;
|
||||
case 261: ram64[uram64[args[1]]] = (int64_t) args[2]; break;
|
||||
case 262: ramd[uram64[args[1]]] = (double) args[2]; break;
|
||||
case 263: uram32[uram64[args[1]]] = (uint32_t) args[2]; break;
|
||||
case 264: ram32[uram64[args[1]]] = (int32_t) args[2]; break;
|
||||
case 265: ramf[uram64[args[1]]] = (float) args[2]; break;
|
||||
case 266: uram16[uram64[args[1]]] = (uint16_t) args[2]; break;
|
||||
case 267: ram16[uram64[args[1]]] = (int16_t) args[2]; break;
|
||||
case 268: uram8[uram64[args[1]]] = (uint8_t) args[2]; break;
|
||||
case 269: ram8[uram64[args[1]]] = (int8_t) args[2]; break;
|
||||
// **a = *b
|
||||
case 270: uram64[uram64[args[1]]] = uram64[args[2]]; break;
|
||||
case 271: ram64[uram64[args[1]]] = ram64[args[2]]; break;
|
||||
case 272: ramd[uram64[args[1]]] = ramd[args[2]]; break;
|
||||
case 273: uram32[uram64[args[1]]] = uram32[args[2]]; break;
|
||||
case 274: ram32[uram64[args[1]]] = ram32[args[2]]; break;
|
||||
case 275: ramf[uram64[args[1]]] = ramf[args[2]]; break;
|
||||
case 276: uram16[uram64[args[1]]] = uram16[args[2]]; break;
|
||||
case 277: ram16[uram64[args[1]]] = ram16[args[2]]; break;
|
||||
case 278: uram8[uram64[args[1]]] = uram8[args[2]]; break;
|
||||
case 279: ram8[uram64[args[1]]] = ram8[args[2]]; break;
|
||||
// **a = **b
|
||||
case 280: uram64[uram64[args[1]]] = uram64[uram64[args[2]]]; break;
|
||||
case 281: ram64[uram64[args[1]]] = ram64[uram64[args[2]]]; break;
|
||||
case 282: ramd[uram64[args[1]]] = ramd[uram64[args[2]]]; break;
|
||||
case 283: uram32[uram64[args[1]]] = uram32[uram64[args[2]]]; break;
|
||||
case 284: ram32[uram64[args[1]]] = ram32[uram64[args[2]]]; break;
|
||||
case 285: ramf[uram64[args[1]]] = ramf[uram64[args[2]]]; break;
|
||||
case 286: uram16[uram64[args[1]]] = uram16[uram64[args[2]]]; break;
|
||||
case 287: ram16[uram64[args[1]]] = ram16[uram64[args[2]]]; break;
|
||||
case 288: uram8[uram64[args[1]]] = uram8[uram64[args[2]]]; break;
|
||||
case 289: ram8[uram64[args[1]]] = ram8[uram64[args[2]]]; break;
|
||||
// cast
|
||||
case 290: uram64[args[1]] = (uint64_t)ram64[args[2]]; break;
|
||||
case 291: uram64[args[1]] = (uint64_t)ramd[args[2]]; break;
|
||||
case 292: uram64[args[1]] = (uint64_t)uram32[args[2]]; break;
|
||||
case 293: uram64[args[1]] = (uint64_t)ram32[args[2]]; break;
|
||||
case 294: uram64[args[1]] = (uint64_t)ramf[args[2]]; break;
|
||||
case 295: uram64[args[1]] = (uint64_t)uram16[args[2]]; break;
|
||||
case 296: uram64[args[1]] = (uint64_t)ram16[args[2]]; break;
|
||||
case 297: uram64[args[1]] = (uint64_t)uram8[args[2]]; break;
|
||||
case 298: uram64[args[1]] = (uint64_t)ram8[args[2]]; break;
|
||||
case 299: ram64[args[1]] = (int64_t)uram64[args[2]]; break;
|
||||
case 300: ram64[args[1]] = (int64_t)ramd[args[2]]; break;
|
||||
case 301: ram64[args[1]] = (int64_t)uram32[args[2]]; break;
|
||||
case 302: ram64[args[1]] = (int64_t)ram32[args[2]]; break;
|
||||
case 303: ram64[args[1]] = (int64_t)ramf[args[2]]; break;
|
||||
case 304: ram64[args[1]] = (int64_t)uram16[args[2]]; break;
|
||||
case 305: ram64[args[1]] = (int64_t)ram16[args[2]]; break;
|
||||
case 306: ram64[args[1]] = (int64_t)uram8[args[2]]; break;
|
||||
case 307: ram64[args[1]] = (int64_t)ram8[args[2]]; break;
|
||||
case 308: ramd[args[1]] = (double)uram64[args[2]]; break;
|
||||
case 309: ramd[args[1]] = (double)ram64[args[2]]; break;
|
||||
case 310: ramd[args[1]] = (double)uram32[args[2]]; break;
|
||||
case 311: ramd[args[1]] = (double)ram32[args[2]]; break;
|
||||
case 312: ramd[args[1]] = (double)ramf[args[2]]; break;
|
||||
case 313: ramd[args[1]] = (double)uram16[args[2]]; break;
|
||||
case 314: ramd[args[1]] = (double)ram16[args[2]]; break;
|
||||
case 315: ramd[args[1]] = (double)uram8[args[2]]; break;
|
||||
case 316: ramd[args[1]] = (double)ram8[args[2]]; break;
|
||||
case 317: uram32[args[1]] = (uint32_t)uram64[args[2]]; break;
|
||||
case 318: uram32[args[1]] = (uint32_t)ram64[args[2]]; break;
|
||||
case 319: uram32[args[1]] = (uint32_t)ramd[args[2]]; break;
|
||||
case 320: uram32[args[1]] = (uint32_t)ram32[args[2]]; break;
|
||||
case 321: uram32[args[1]] = (uint32_t)ramf[args[2]]; break;
|
||||
case 322: uram32[args[1]] = (uint32_t)uram16[args[2]]; break;
|
||||
case 323: uram32[args[1]] = (uint32_t)ram16[args[2]]; break;
|
||||
case 324: uram32[args[1]] = (uint32_t)uram8[args[2]]; break;
|
||||
case 325: uram32[args[1]] = (uint32_t)ram8[args[2]]; break;
|
||||
case 326: ram32[args[1]] = (int32_t)uram64[args[2]]; break;
|
||||
case 327: ram32[args[1]] = (int32_t)ram64[args[2]]; break;
|
||||
case 328: ram32[args[1]] = (int32_t)ramd[args[2]]; break;
|
||||
case 329: ram32[args[1]] = (int32_t)uram32[args[2]]; break;
|
||||
case 330: ram32[args[1]] = (int32_t)ramf[args[2]]; break;
|
||||
case 331: ram32[args[1]] = (int32_t)uram16[args[2]]; break;
|
||||
case 332: ram32[args[1]] = (int32_t)ram16[args[2]]; break;
|
||||
case 333: ram32[args[1]] = (int32_t)uram8[args[2]]; break;
|
||||
case 334: ram32[args[1]] = (int32_t)ram8[args[2]]; break;
|
||||
case 335: ramf[args[1]] = (float)uram64[args[2]]; break;
|
||||
case 336: ramf[args[1]] = (float)ram64[args[2]]; break;
|
||||
case 337: ramf[args[1]] = (float)ramd[args[2]]; break;
|
||||
case 338: ramf[args[1]] = (float)uram32[args[2]]; break;
|
||||
case 339: ramf[args[1]] = (float)ram32[args[2]]; break;
|
||||
case 340: ramf[args[1]] = (float)uram16[args[2]]; break;
|
||||
case 341: ramf[args[1]] = (float)ram16[args[2]]; break;
|
||||
case 342: ramf[args[1]] = (float)uram8[args[2]]; break;
|
||||
case 343: ramf[args[1]] = (float)ram8[args[2]]; break;
|
||||
case 344: uram16[args[1]] = (uint16_t)uram64[args[2]]; break;
|
||||
case 345: uram16[args[1]] = (uint16_t)ram64[args[2]]; break;
|
||||
case 346: uram16[args[1]] = (uint16_t)ramd[args[2]]; break;
|
||||
case 347: uram16[args[1]] = (uint16_t)uram32[args[2]]; break;
|
||||
case 348: uram16[args[1]] = (uint16_t)ram32[args[2]]; break;
|
||||
case 349: uram16[args[1]] = (uint16_t)ramf[args[2]]; break;
|
||||
case 350: uram16[args[1]] = (uint16_t)ram16[args[2]]; break;
|
||||
case 351: uram16[args[1]] = (uint16_t)uram8[args[2]]; break;
|
||||
case 352: uram16[args[1]] = (uint16_t)ram8[args[2]]; break;
|
||||
case 353: ram16[args[1]] = (int16_t)uram64[args[2]]; break;
|
||||
case 354: ram16[args[1]] = (int16_t)ram64[args[2]]; break;
|
||||
case 355: ram16[args[1]] = (int16_t)ramd[args[2]]; break;
|
||||
case 356: ram16[args[1]] = (int16_t)uram32[args[2]]; break;
|
||||
case 357: ram16[args[1]] = (int16_t)ram32[args[2]]; break;
|
||||
case 358: ram16[args[1]] = (int16_t)ramf[args[2]]; break;
|
||||
case 359: ram16[args[1]] = (int16_t)uram16[args[2]]; break;
|
||||
case 360: ram16[args[1]] = (int16_t)uram8[args[2]]; break;
|
||||
case 361: ram16[args[1]] = (int16_t)ram8[args[2]]; break;
|
||||
case 362: uram8[args[1]] = (uint8_t)uram64[args[2]]; break;
|
||||
case 363: uram8[args[1]] = (uint8_t)ram64[args[2]]; break;
|
||||
case 364: uram8[args[1]] = (uint8_t)ramd[args[2]]; break;
|
||||
case 365: uram8[args[1]] = (uint8_t)uram32[args[2]]; break;
|
||||
case 366: uram8[args[1]] = (uint8_t)ram32[args[2]]; break;
|
||||
case 367: uram8[args[1]] = (uint8_t)ramf[args[2]]; break;
|
||||
case 368: uram8[args[1]] = (uint8_t)uram16[args[2]]; break;
|
||||
case 369: uram8[args[1]] = (uint8_t)ram16[args[2]]; break;
|
||||
case 370: uram8[args[1]] = (int8_t)ram8[args[2]]; break;
|
||||
case 371: ram8[args[1]] = (int8_t)uram64[args[2]]; break;
|
||||
case 372: ram8[args[1]] = (int8_t)ram64[args[2]]; break;
|
||||
case 373: ram8[args[1]] = (int8_t)ramd[args[2]]; break;
|
||||
case 374: ram8[args[1]] = (int8_t)uram32[args[2]]; break;
|
||||
case 375: ram8[args[1]] = (int8_t)ram32[args[2]]; break;
|
||||
case 376: ram8[args[1]] = (int8_t)ramf[args[2]]; break;
|
||||
case 377: ram8[args[1]] = (int8_t)uram16[args[2]]; break;
|
||||
case 378: ram8[args[1]] = (int8_t)ram16[args[2]]; break;
|
||||
case 379: ram8[args[1]] = (int8_t)uram8[args[2]]; break;
|
Loading…
Reference in a new issue