-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Many systems have their primary high-level programming language: C on Unix, Objective-C on NeXTSTEP/iOS, Java on Android, C# on Windows Phone. I think DCPU-16 may have one, and for me the best PL would be B.
Why B?
- Typeless: everything is a machine word, just like in DCPU-16 assembly.
- You don't have to include lots of useless functions, variables and other stuff, you can use extern to include specific things.
- It's easy to learn for C and C derivative programmers.
Problems with B.
- There's no difference between signed and unsigned numbers.
Possible additions to B.
- Inline assembly.
- Inline functions/macros.
- Inline register access functions written in inline assembly (indirect, like div(dividend, divisor, *excess) - for direct access, use inline assembly).
- Inline signed/unsigned functions written in inline assembly.
Some inline functions.
- putchar(char, color) // Color includes blinking
- puts(length, color) // String itself starts right after length
- Arithmetic functions with excess.
- int(address, interrupt)
- hwi(address, interrupt)
What do you think?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels