Entrance Diary Palmware Database BBS in Japanese
iziBasic programming technique in English

iziBasic iziBasic is a high level development compiler which builds Stand-alone applications.
The great thing is that it does all of that directly on-board of your Palm OS based device.
=> aldweb



1 YYYYYYYMMMMDDDDD => "YYYY/MM/DD"
2 display string in the center of the screen.
3 hexadecimal => decimal
4 hexadecimal => binary
5 KeyState
6 All the keys check in OFF.
7 message
8 iziColorSelect







About iziBasic in Japanese







* YYYYYYYMMMMDDDDD => "YYYY/MM/DD"

'[Input]A$=Date(2bytes)
'[Output]Z$="YYYY/MM/DD"
'[Destroy]W,W$,U
_GetDate:
W$=CHAR$(A$,1):W=ASC(W$)
'----------YYYY
U=W\2+1904
Z$=STR$(U,0)+"/"
W$=CHAR$(A$,2):W=W*256+ASC(W$)
'----------MM
U=(W\32) AND 15
IF U<10 LET Z$=Z$+"0"
Z$=Z$+STR$(U,0)+"/"
'----------DD
U=W AND 31
IF U<10 LET Z$=Z$+"0"
Z$=Z$+STR$(U,0)
RETURN
YYYYYYYMMMMDDDDD

YYYYYYY7bitsyear (0 = 1904)
MMMM4bitsmonth (1...12)
DDDDD5bitsday (1...31)




* display string in the center of the screen.

iziBasic FontWidth.iBAS
' FontWidth.iBAS
{CreatorID "HELO"}
{Version "1.0"}
{PARSER ON}

BEGIN
M$="Hello World"
F=FONTWIDTH(M$,0)
X=(160-F)/2
GPRINT M$,X,80,1
WAIT
END



* hexadecimal => decimal

'[Input]A$=hexadecimal
'[Output]A=decimal
'[Destroy]
_HexToDec:
PUSH A$
  A$=UCASE$(A$)
  A=INSTRING("0123456789ABCDEF",A$,1)-1
POP A$
RETURN

"-1" is returned if a value is an error.


* hexadecimal => binary

'[Input]A$=hexadecimal
'[Output]A$=binary
'[Destroy]
_HexToBin:
PUSH A
  A$=UCASE$(A$)
  A=INSTRING("0123456789ABCDEF",A$,1)-1
  A$="000"+BIN$(A):A$=RIGHT$(A$,4)
POP A
RETURN


* KeyState

The detection result of the hardware keys is passed to iziBasic.

PP Applet "KeyState"


* All the hardware keys check in OFF.

Use PP Applet "KeyState"

REPEAT
  A$=CALLPP$(100):I=INSTRING(A$,"1",1)
UNTIL I=0


* message

PRINT does not turn down the string that protruded from the right-side end of the screen.
You must handle this by oneself.
When the width of the character string is bigger than 155, I divide string and display it.

'[Input]M$=message
'[Output]
'[Destroy]M$
_PrintMSG:
PUSH T
PUSH U
PUSH N$
T=FONTWIDTH(M$,0)
IF T>155 THEN
  U=LEN(M$)
  REPEAT
    DEC U:N$=LEFT$(M$,U):T=FONTWIDTH(N$,0)
  UNTIL T<=155
  PRINT N$
  U=LEN(M$)-U:M$=RIGHT$(M$,U)
END IF
PRINT M$
POP N$
POP U
POP T
RETURN


* iziColorSelect

It is examined a color number.

iziColorSelect

'iziColorSelect.iBAS
{CreatorID "HELO"}
{Version "1.0"}
{PARSER ON}
{CONSOLEFONT OFF}

BEGIN
BUTTON #1,"Select",60,40,40,12
BOX 19,99 TO 141,151
B=COLOR(1):C=255
REPEAT
  E=DOEVENTS
  IF E=1 THEN
    C=COLORSELECT(C):C$=STR$(C,0)
    COLOR C:BOXFILLED 20,100 TO 140,150
    COLOR B:GPRINT C$,60,60
  END IF
UNTIL E<0
END
























Entrance Diary Palmware Database BBS in Japanese