'=========================================================================== ' Subject: Commands For ATOM VM Date: 06-14-03 ( : ) ' Author: Rick Clark Code: ATOM ' Origin: rickclark58@yahoo.com Packet: ATOM.ABC '=========================================================================== ATOM COMMANDS - Rick Clark rickclark58@yahoo.com Atom is a register based virtual machine consisting of 32 registers of each data type, (Long) Integers, (double) Floats and Strings. I came up with my own programming language called Atom Assembler that can be used to write programs for Atom. It is still in development, but I am pretty close to releasing a beginning version of the VM. It is still missing a lot of stuff, but is useable in its present state. Here is a list of current commands that have been implemented. I am working on adding transcendental functions (sin, cos). You'll notice things like saving the current frame, file I/O and such haven't been added yet. I am still working out issues on these and won't be in the first beta version. Atom Commands ------------- T = any register N = numeric register S = string register I = Integer register F = Float register [] = optional | = will accept either type of parameter Comments start with # to end of line Screen ------- cls: print: Tx | "string"[;] screen: Iz, Iy | number, Ix | number locate: Ix | number, Iy | number, [0] color: Ifg | number, Ibg | number panel: Ix1 | number, Iy1 | number, Ix2 | number, Iy2 | number, Ifg | number, Ibg | number, Icd | number, 1|0 input: Tx, [Sx | string] Data ----- set: Tx, Ty add: Nx, Ny, Nz sub: Nx, Ny, Nz mul: Nx, Ny, Nz div: Nx, Ny, Nz mod: Nx, Ny, Nz pow: Nx, Ny, Nz inc: Nx, number | Ny dec: Nx, number | Ny tonumber: Nx, Sy | string sqrt: Fx, Ny | number String ------ concat: Sx, Sy tostring: Sx, Ny substr: Sx, Sy, start, length len: Ix, Sy rev: Sx, Sy instr: Ix, Sx, Sy right: Sx, Sy, length left: Sx, Sy, length Logical ------- eq: Tx, Ty, LABEL_True, LABEL_False ne: Tx, Ty, LABEL_True, LABEL_False lt: Tx, Ty, LABEL_True, LABEL_False gt: Tx, Ty, LABEL_True, LABEL_False le: Tx, Ty, LABEL_True, LABEL_False ge: Tx, Yy, LABEL_True, LABEL_False Flow Control ------------ label@ Jump label goto: LABEL branch: Nx | (number|-number) gosub: LABEL - Return: end: Date-Time --------- date: Sx time: Sx hour: Sx min: Sx sec: Sx ampm: Sx year: Sx month: Sx day: Sx dayname: Sx weekday: Sx yearday: Sx week: Sx