Programming Languages
Programming Languages
Is everyone else here using ASM and C/C++ for their OS, or is anyone using an 'alternative' programming language?
RE:Programming Languages
I made my own, it's half-way between asm and C. I'm thinking about releasing it, if enough people want it. It's real-mode only, but you can use 32-bit registers.
Here's a Hello World program for DOS:
#EXT .com #ORG 100h
(Print Hello World! to the screen)
# si = hellomsg;
call print;
(Print numbers 0-9)
ax = 10;
{ ax --; push ax;
ah = 0eh; bh || bh; int 10h;
pop ax;
}nz
(Exit to DOS)
ah = 0x21; al || al; int 21h;
hellomsg: "Hello world!\n\z";
print:
lodsb;
al | al; ifnz{ ah = 0eh; bh || bh; int 10h; jmp print; }
ret;
#DOVARREFS;
Here's a Hello World program for DOS:
#EXT .com #ORG 100h
(Print Hello World! to the screen)
# si = hellomsg;
call print;
(Print numbers 0-9)
ax = 10;
{ ax --; push ax;
ah = 0eh; bh || bh; int 10h;
pop ax;
}nz
(Exit to DOS)
ah = 0x21; al || al; int 21h;
hellomsg: "Hello world!\n\z";
print:
lodsb;
al | al; ifnz{ ah = 0eh; bh || bh; int 10h; jmp print; }
ret;
#DOVARREFS;
RE:Programming Languages
watcom c++ and a little bit of asm for startup things (entrypoint), interrupt handlers and cpu initialization