summaryrefslogtreecommitdiff
path: root/src/sys/np/sample/rev-0.np
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/np/sample/rev-0.np')
-rw-r--r--src/sys/np/sample/rev-0.np21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sys/np/sample/rev-0.np b/src/sys/np/sample/rev-0.np
new file mode 100644
index 0000000..c3f781f
--- /dev/null
+++ b/src/sys/np/sample/rev-0.np
@@ -0,0 +1,21 @@
+;;
+;; Program entrypoint
+;;
+proc
+main(u8 argc, u8 **argv) -> i8
+begin
+ u8 *vga = ptr(0x8B000)
+
+ if argc < 2 begin
+ return -1
+ end
+
+ ;; Draw '*' chars
+ for [i=0 : i<8 : i += 2] begin
+ vga[i + 0] = '*' ;; char '*'
+ vga[i + 1] = 0x07 ;; red
+ end
+
+ return 0
+end
+