stdcall void OpcodeTrap(int Immediate); must be userdefined. It traps Opcode $f2.

native int round(float number);
native int trunc(float number);
native float sin(float number);
native float cos(float number);
native float abs(float number);
native float frac(float number);
native float exp(float number);
native float ln(float number);
native float sqr(float number);
native float sqrt(float number);
native float random();
native float rand();
native float pi();
native float readfloat();
native int readint();
native unsigned int readuint();
native string readstring();
native unsigned char readchar();
native void readln();
native void flushin();
native void flush();
native void flushout();
native string trim(string src);
native string copy(string src,int index,int count);
native int length(string src);
native unsigned char charat(string src,int index);
native unsigned int charpointerat(string src,int index);
native string delete(string src,int index,int count);
native string insert(string src,string dst,int index);
native string setstring(char *src,int srclength);
native string lowercase(string src);
native string uppercase(string src);
native unsigned char locase(unsigned int src);
native unsigned char upcase(unsigned int src);
native int pos(string substr,string str,int first);
native int posex(string substr,string str,int first);
native string inttostr(int number,int digits);
native unsigned int getmem(int size);
native void freemem(void *datapointer);
native unsigned int malloc(int size);
native void free(void *datapointer);
native unsigned int fileopen(string filename);
native unsigned int filecreate(string filename);
native void fileclose(void *filepointer);
native int fileseek(void *filepointer,int position);
native int fileposition(void *filepointer);
native int filesize(void *filepointer);
native int fileeof(void *filepointer);
native int fileread(void *filepointer,char *buffer,int counter);
native int filewrite(void *filepointer,char *buffer,int counter);
native string filereadline(void *filepointer);
native void filewriteline(void *filepointer,string str);
native unsigned int gettickcount();
native int exec(string filename,string parameter);
native string inttobase(int value,int base);
native string inttohex(int value);
native string uinttobase(unsigned int value,unsigned int base);
native string uinttohex(unsigned int value);
native stdcall int paramcount();
native stdcall string paramstr(int paramno);
native stdcall void EmulateLine();
native stdcall int ShouldExit();
native stdcall void AllocConsole();
native stdcall void FreeConsole();
native stdcall void Reset();
native stdcall void LoadD64(string filename);
native stdcall void LoadPRG(string filename);
native stdcall void SetKeyBuffer(string KeyBuffer);
native stdcall void SetKernalKeyBuffer(string KeyBuffer);
native stdcall void SetKeySpeed(int RasterLinesInterval);
native stdcall void SetVIC(int Active,int RasterLineCycles,int BadLineCycles);
native stdcall void SetSID(int Active);
native stdcall void SetSpeedThrottling(int Active);
native stdcall void SetFrameSkip(int FrameSkip);
native stdcall void SetCPU(int A,int X,int Y,int S,int P,int PC,int Halted);
native stdcall void GetCPU(int *A,int *X,int *Y,int *S,int *P,int *PC,int *Halted);
native stdcall void Poke(int Address,int Value);
native stdcall int Peek(int Address);
native stdcall void Push(int Value);
native stdcall int Pop();
native stdcall int Assemble(string Source);
native stdcall int AssembleFile(string SourceFileName);
native stdcall int AssembleToFile(string Source,string DestFileName);
native stdcall int AssembleFileToFile(string SourceFileName,string DestFileName);
native stdcall string AssemblerErrors();
#define paramcountconst [ANUMBER]
#define vicrasterlines [ANUMBER]
byte *KeyRevMatrix[8];
byte *KeyMatrix[8];
byte *RAM[65535];

Using of DLLs:

import stdcall int MessageBox(unsigned int hWnd,char *lpText,char *lpCaption,unsigned int uType)("user32.dll","MessageBoxA");
void main(){
 MessageBox(0,"Ein Hallo aus BeRoScript","DLL Test",0);
}

Unions:

union sA {
 int a;
 unsigned byte b[4];
};
sA a;
int main() {
 a.a=0x803F1F0F;
 printf(a.b[0]," ");
 printf(a.b[1]," ");
 printf(a.b[2]," ");
 printf(a.b[3]," ");
 a.a=-4;
 printf(a.a/2," ");
}

Structs:

struct sVector3
{
  float x;
  float y;
  float z;
};

void VectorAdd(sVector3 v1, sVector3 v2, sVector3 *res)
{
  res.x = v1.x + v2.x;
  res.y = v1.y + v2.y;
  res.z = v1.z + v2.z;
}

int main()
{
  sVector3 v;
  v.x = 1;
  v.y = 2;
  v.z = 4;

  sVector3 res;
  VectorAdd(v, v, &res);

  printf(res.x,"\n");
  printf(res.y,"\n");
  printf(res.z,"\n");
}

OOP:

enum Geschlechter { maennlich=0, weiblich }
object Mensch {
 string Name;
 int Alter;
 int Geschlecht;
};
object Ort {
 string Adresse;
};
object Schule(Ort) {
 string Form;
};
object Lehrer(Mensch,Schule) {
 string Fach;
};
object Schueler(Mensch,Schule) {
 bool IstGut;
};
int Mensch::EineZahl() {
 return 1234;
}
void Mensch::printdata() {
 printf("Name: ",Name,"\n");
 printf("Alter: ",Alter,"\n");
 printf("Geschlecht: ",Geschlecht?"weiblich":"maennlich","\n");
}
void Ort::printdata() {
 printf("Adresse: ",this->Adresse,"\n");
}
void Schule::printdata() {
 inherited();
 printf("Schulform: ",this->Form,"\n");
}
void Lehrer::printdata() {
 inherited Mensch();
 inherited Schule();
 printf("Unterrichtet: ",Fach,"\n");
 printf(inherited Mensch.EineZahl()*2,"\n\n");
}
void Schueler::printdata() {
 inherited Mensch.printdata();
 inherited Schule.printdata();
 printf("Status: ",this->IstGut?"liefert gute Leistungen":"ist super faul","\n");
 printf(inherited EineZahl(),"\n\n");
}
void main(){
 Lehrer HerrMustermann;
 Schueler Max;
 HerrMustermann.Name="Tom Mustermann";
 HerrMustermann.Alter=38;
 HerrMustermann.Geschlecht=maennlich;
 HerrMustermann.Adresse="Musterstrasse 123";
 HerrMustermann.Form="Gesamtschule";
 HerrMustermann.Fach="Mathematik";
 Max.Name="Max Schmidt";
 Max.Alter=18;
 Max.Geschlecht=maennlich;
 Max.Adresse="Musterstrasse 123";
 Max.Form="Gesamtschule";
 Max.IstGut=true;
 HerrMustermann.printdata();
 Max.printdata();
} 

Preprocessor:

#define InRange(x,y,x1,y1,x2,y2) if((x>x1)&(y>y1)&(x<x2)&(y<y2))
int main(){
 InRange(128,128,0,0,256,256){
  printf("Punkt liegt im Rect!");
 }
}

eNums:

enum monate { Jan=1,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec };
void main() {
 bool Wert;
 Wert=true;
 switch(Wert){
  case false:printf("Falsch\n");break;
  case true:printf("Wahr\n");break;
 }
 Wert?printf("Das ist wahr\n"):printf("Das ist nicht wahr\n");
 printf(Jan);
}

Strings:

string test(string a,string b) {
 return a+b;
}
int main() {
 string b,c,d;
 char a;
 d="loam";
 c=" H"+d[2]+d[0]+d[0]+d[1]+" ";
 c=trim(c);
 c+=" Welt";
 b="ent";
 a="M";
 c=test(a+d[1]+d[3]+b,"... ")+c+" ;)";
 c=copy(c,0,9);
 c=delete(c,0,3);
 c=insert("Mom",c,0);
 c=uppercase(c);
 printf(c,"\n");
 int i=pos("OM",c,1);
 printf(i,"\n");
 i=posex("mEnT...",c,0);
 printf(i,"\n");
}

