POS Application Programming

Ingredients Required :

  • NASM (Netwide Assembler)
  • POS Developer Kit (See the downloads page)
  • And of course a text editor (Notepad++ if you want syntax highlighting)

Recipie

First of all let's build a simple POS App in POSBASIC,
{For checking out the POS-in-built POSBASIC Intepreter Please See the features/basic.asm file}

Sample Program :

PRINT "Hello World? What the Hell is that?"
GOTO MAIN
MAIN:
INPUT $1
IF $1 = "CRAP" THEN GOTO EXIT
GOTO MAIN
EXIT:
PRINT "What? I am CRAP? HOW DARE YOU?"
END

Now Open up the system.flp with PowerISO/Imdisk or any other Virtual Floppy Application, and then add
your file name it as <FILENAME>.COM (Should be less than 6 Chars)
Then run POS and Execute your program by the CLI or the File Explorer


This is some damn tough code, It's in POS Assembly but is powerful than POSBASIC,
BITS 16 ;----------------------Set Code in 16-bit Mode
ORG 32768 ;-------------Start code a 32K point
%INCLUDE "POSH.INC" ;-------------Include System Files
%INCLUDE "SYSTEM.INC"
start: ;---------Start Code!!!
mov si, print_string ;------Assign Register SI to print_string
call os_print_string ;-----------Print String Function
call os_wait_for_key ;---------Wait for Key Press
ret ;-----Return Back to OS Shell
print_string db "Hello World",0 ;---Print String Value

Save this File to your POS-SDK folder and then extract NASM to your POS-SDK directory,
Compile with NASM,
Rename the file extension to EXE
Copy to your Floppy Image
Run the program through the OS

Last edited Sep 10, 2013 at 10:58 AM by ALLDESP, version 1