Progsbase Instruction Set

  • Computational instructions always give the same output for the same input, and they have no other effects.
  • Infrastructural instructions give different (or no) output for the same input (if any), and they cause outside effects.
    • Each infrastructural instruction comes in four asynchronous variants: snd, rcv, srv snd and srv rcv.
  • Read the full story behind the instruction set in Foundations of Computer Science.

Filters

all computational infrastructural arithmetic relational boolean control-flow block expression structural data conversion processing-unit disk clock screen processing-unit-controller keyboard audio

Mnemonic Name Arguments Type Categories
add Add x = a + b Computational arithmetic
sub Subtract x = a - b Computational arithmetic
mul Multiply x = a * b Computational arithmetic
div Divide x = a / b Computational arithmetic
pow Exponentiate x = a ^ b Computational arithmetic
mod Modulus x = a % b Computational arithmetic
max Maximum x = max(a, b) Computational arithmetic
min Minimum x = min(a, b) Computational arithmetic
neg Negate x = -a Computational arithmetic
pos Positive x = +a Computational arithmetic
sqrt Square Root x = sqrt(a) Computational arithmetic
rnd Round x = round(a) Computational arithmetic
flr Floor x = floor(a) Computational arithmetic
cil Ceil x = ceil(a) Computational arithmetic
tnc Truncate x = truncate(a) Computational arithmetic
abs Absolute x = abs(a) Computational arithmetic
log Logarithm x = log(a) Computational arithmetic
ln Natural Logarithm x = ln(a) Computational arithmetic
sin Sine x = sin(a) Computational arithmetic
cos Cosine x = cos(a) Computational arithmetic
tan Tangent x = tan(a) Computational arithmetic
asin Arc Sine x = asin(a) Computational arithmetic
acos Arc Cosine x = acos(a) Computational arithmetic
atan Arc Tangent x = atan(a) Computational arithmetic
exp Exponential x = exp(a) Computational arithmetic
eq Equals x = a = b Computational relational
neq Unequals x = a != b Computational relational
lt Less Than x = a < b Computational relational
lte Less Than or Equal x = a <= b Computational relational
gt Greater Than x = a > b Computational relational
gte Greater Than or Equal x = a >= b Computational relational
and And x = a & b Computational boolean
or Or x = a | b Computational boolean
not Not x = !a Computational boolean
if If if a { Computational control-flow block
else Else } else { Computational control-flow block
loop Loop loop { Computational control-flow block
init Begin Loop Initialization Block (block) Computational block
inc Begin Loop Increment Block (block) Computational block
call Call x = f(a, b, ...) Computational control-flow block
fnc Begin Function Block function f { Computational block
ret Return return a Computational control-flow block
bgs Begin Structure Block struct { Computational block
endb End Block } Computational block
par Parenthesis x = (a) Computational expression
mov Copy x = a Computational data
len Length x = a.length Computational structural
idr Read Array at Index x = a[b] Computational structural
idw Write Array at Index x[a] = b Computational structural
acw Write Accessed Structure x.a = b Computational structural
acr Read Accessed Structure x = a.b Computational structural
cvt Convert x = (type)b Computational conversion
new Allocate Structure x = new S Computational data
nwa Allocate Primitive Array x = new type[b] Computational data
nsa Allocate Structure Array x = new S[a] Computational data
del Deallocate Structure delete a Computational data
dla Deallocate Array delete [] a Computational data
num Number Entry decimal a Computational structure
bl Boolean Entry boolean a Computational structure
chr Character Entry char a Computational structure
str Structure Entry S a Computational structure
nma Number Array Entry decimal [] a Computational structure
bla Boolean Array Entry boolean [] a Computational structure
cha Character Array Entry char [] a Computational structure
sta Structure Array Entry S [] a Computational structure
pcl Call Processing Unit call(dev, req, res) Infrastructural processing-unit
snd Send to Processing Unit send(dev, data) Infrastructural processing-unit
rcv Receive from Processing Unit receive(dev, data) Infrastructural processing-unit
chk Check x = check(dev) Infrastructural processing-unit
srv snd Server Send serversend(dev, data) Infrastructural processing-unit
srv rcv Server Receive serverreceive(dev, data) Infrastructural processing-unit
dsp Get Disk Entry Specifications diskspecs(dev, e, s) Infrastructural disk
drd Read Disk Entry x = readdisk(dev, n, data) Infrastructural disk
dwr Write Disk Entry x = writedisk(dev, n, data) Infrastructural disk
csp Get Clock Resolution and Range clockspecs(dev, res, range) Infrastructural clock
ctm Get Current Time x = time(dev, res) Infrastructural clock
spc Get Screen Specifications screenspecs(dev, w, h, d) Infrastructural screen
sdsp Display Image display(dev, img) Infrastructural screen
syn Synchronize Image sync(dev) Infrastructural screen
psp Get Processing Unit Controller Specifications puspecs(dev, pus, progs) Infrastructural processing-unit-controller
psta Start Processing Unit start(dev, n) Infrastructural processing-unit-controller
pstp Stop Processing Unit stop(dev, n) Infrastructural processing-unit-controller
pse Set Program execute(dev, n, p) Infrastructural processing-unit-controller
pex Was Exception exception(dev, n) Infrastructural processing-unit-controller
ksp Get Keyboard Specifications kbspecs(dev, ctlkeys, sim) Infrastructural keyboard
kst Get Keyboard State keys(dev, state) Infrastructural keyboard
asp Get Audio Specifications audiospecs(dev, dens, mindelay) Infrastructural audio
acd Get Current Delay x = audiodelay(dev) Infrastructural audio
aws Write Audio Samples x = writeadio(dev, samples) Infrastructural audio
Contact Information

We would be more than happy to help you. Our opening hours are 9–15 (CET).

[email protected]

📞 (+47) 93 68 22 77

Nils Bays vei 50, 0876 Oslo, Norway

Copyright © 2018-22 progsbase.com by Inductive AS.