View previous topic - View next topic |
Author |
Message |
JQB45 Lowly Slime
Joined: 08 Aug 2004 Posts: 4 Location: Near Fort Walton Beach, FL
|
Posted: Sun Aug 08, 2004 2:49 pm Post subject: Hello - I am new here |
[quote] |
|
Can some one tell me what this place is all about?
And what expertise is available here?
I am a Vb.Net, VB6, QB45, NASM developer and was wondering what some of you are fluent in,
-Jeff _________________ www.jqb45.com
|
|
Back to top |
|
|
Verious Mage
Joined: 06 Jan 2004 Posts: 409 Location: Online
|
Posted: Sun Aug 08, 2004 3:00 pm Post subject: |
[quote] |
|
RPGDX is a great website that is oriented towards CRPG (Computer Role Playing Game) Developers. You will find people on these forums who are fluent in a variety of diverse programming languages.
I personally prefer VB or VB.net; however, there are many people on this site who use C, C++, QB, Perl, and a million other languages to develop their RPGs. There really is no "perfect" language to program in, instead people use what works for them and what they are comfortable with.
|
|
Back to top |
|
|
JQB45 Lowly Slime
Joined: 08 Aug 2004 Posts: 4 Location: Near Fort Walton Beach, FL
|
Posted: Sun Aug 08, 2004 3:26 pm Post subject: Thanks for your reply. |
[quote] |
|
I myself like rpg's quite a bit.
I'm mostly interested in early Wizardy or Bards Tale Type games. I plan to make a Wizardry Type game at some point in the future.
At the moment I am working on a very poweful stack type byte code compiler - and will be looking for assistance from the community to help me port it to C/C++...
-Jeff _________________ www.jqb45.com
|
|
Back to top |
|
|
Ninkazu Demon Hunter
Joined: 08 Aug 2002 Posts: 945 Location: Location:
|
Posted: Sun Aug 08, 2004 3:32 pm Post subject: |
[quote] |
|
I'm working on an ASM-style stack type byte code compiler myself, but it's specialized for scripting my RPG engine, and couldn't act as its own language.
Right now I just have the operators and API calls programmed in. I just started a couple days ago (after planning and planning for a long time) and I still have the parser and lexer to go.
|
|
Back to top |
|
|
valderman Mage
Joined: 29 Aug 2002 Posts: 334 Location: Gothenburg, Sweden
|
Posted: Sun Aug 08, 2004 6:46 pm Post subject: |
[quote] |
|
What a coincidence... I, too, am working on a little scripting system; a complete overhaul of the one I have in the projects right now, with a C-style language and a bytecode VM. _________________ http://www.weeaboo.se
|
|
Back to top |
|
|
Nodtveidt Demon Hunter
Joined: 11 Nov 2002 Posts: 786 Location: Camuy, PR
|
Posted: Sun Aug 08, 2004 7:08 pm Post subject: |
[quote] |
|
Well it's about time you got here, JQB45 :) _________________ If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
|
|
Back to top |
|
|
BigManJones Scholar
Joined: 22 Mar 2003 Posts: 196
|
Posted: Sun Aug 08, 2004 8:38 pm Post subject: |
[quote] |
|
Yes, welcome to the byte code vm club; mine was in java with a BASIC interpreter.
I'd say this is more of a snes-style console rpg site over baldurs gate/diablo; at least the vast majority of games persue this style here it seems.
What follows is my impression of the language and api's denizins here use.
Languages commonly used (both for gaming and otherwise):
qb
vb
c
c++
java
python
php
lua
Apis that seem to be used;
Allegro
sdl
clanlib
pygame
java2d
qb weirdness
Gfx style is almost predominately 2d; a couple of people have produce 3d games or demos.
|
|
Back to top |
|
|
JQB45 Lowly Slime
Joined: 08 Aug 2004 Posts: 4 Location: Near Fort Walton Beach, FL
|
Posted: Mon Aug 09, 2004 5:35 pm Post subject: wow - I got alot of replies, thats nice. |
[quote] |
|
Its been along time since thats happened.
Anyhow I would be interested in the source code to
your stack machines especially those developed in ASM or C/C++.
I will post mine later today.
-Jeff _________________ www.jqb45.com
|
|
Back to top |
|
|
valderman Mage
Joined: 29 Aug 2002 Posts: 334 Location: Gothenburg, Sweden
|
Posted: Mon Aug 09, 2004 10:20 pm Post subject: Re: wow - I got alot of replies, thats nice. |
[quote] |
|
JQB45 wrote: | Its been along time since thats happened.
Anyhow I would be interested in the source code to
your stack machines especially those developed in ASM or C/C++.
I will post mine later today.
-Jeff | Sure thing, I just reached a stage where I'm calling it finished until the next nasty bug shows its ugly face.
The source is very poorly commented and pretty ugly in places (esp. true for the compiler part), there's no optimizer and some of the instructions for the VM seem pretty insane. Oh well, that's what happens when you're only coding after midnight.
Anyway, it's a huge improvement over the last scripting system I worked on.
Download: http://mormor.no-ip.com/get.php?f=VVM2.zip _________________ http://www.weeaboo.se
|
|
Back to top |
|
|
JQB45 Lowly Slime
Joined: 08 Aug 2004 Posts: 4 Location: Near Fort Walton Beach, FL
|
Posted: Tue Aug 10, 2004 3:16 pm Post subject: Wow - lol |
[quote] |
|
That is some very complicated code...
This is the interpreter I created. Not all the instuctures are done and I'm working on function ... end_function I believe its slightly buggy...
Here is the test file.
Code: |
module main
function main
push_int32 436789
callfn console_writeline
end_function
function console_writeline
cstr
print_str
end_function
end_module
|
Here is the code.
Code: |
DEFINT A-Z
TYPE udtStack
float AS DOUBLE
int16 AS INTEGER
int32 AS LONG
str AS LONG
END TYPE
TYPE udtFunctions
ssource AS STRING * 40
lposition AS LONG
llength AS LONG
END TYPE
CONST True = -1
CONST False = 0
DECLARE SUB main ()
DECLARE SUB parseTokens (icount AS INTEGER)
DECLARE SUB restoreState ()
DECLARE SUB saveState ()
DECLARE SUB serror (ssource AS STRING)
DIM SHARED spriModuleName AS STRING
DIM SHARED spriTokens(255) AS STRING
DIM SHARED ipriTokens AS INTEGER
DIM SHARED upriStack(255) AS udtStack
DIM SHARED ipriStack AS INTEGER
DIM SHARED spriOldTokens(27, 255) AS STRING
DIM SHARED ipriOldTokens AS INTEGER
DIM SHARED spriStringHeap(255) AS STRING
DIM SHARED ipriStringHeap AS INTEGER
DIM SHARED upriFunctions(255) AS udtFunctions
DIM SHARED ipriFunctions AS INTEGER
DIM SHARED spriCurrentFunction AS STRING
DIM SHARED lpriCurrentBytePos AS LONG
DIM SHARED lpriOldCurrentBytePos(27) AS LONG
DIM SHARED bprifunctionfoundflag AS LONG
DIM SHARED bpriFunctionExecuting AS LONG
DIM SHARED ipriState AS INTEGER
CLS
main
END
SUB main
DIM schar AS STRING
DIM stemp AS STRING
OPEN "c:\qb45\jisc3\test\test.asm" FOR INPUT AS #1
DO
schar = INPUT$(1, #1)
lpriCurrentBytePos = lpriCurrentBytePos + 1
SELECT CASE schar
CASE CHR$(10), CHR$(13)
spriTokens(ipriTokens) = stemp
ipriTokens = ipriTokens + 1
stemp = ""
parseTokens ipriTokens
CASE CHR$(9), CHR$(32)
spriTokens(ipriTokens) = stemp
ipriTokens = ipriTokens + 1
stemp = ""
CASE CHR$(34)
DO
schar = INPUT$(1, #1)
SELECT CASE schar
CASE CHR$(34)
EXIT DO
CASE ELSE
stemp = stemp + schar
END SELECT
LOOP UNTIL EOF(1)
CASE ELSE
stemp = stemp + schar
END SELECT
LOOP UNTIL EOF(1)
CLOSE #1
END SUB
SUB parseTokens (icount AS INTEGER)
DIM iindex AS INTEGER
DIM iiterate AS INTEGER
DIM itmp01 AS INTEGER
DIM itmp02 AS INTEGER
DIM ltmp01 AS LONG
DIM ltmp02 AS LONG
DIM dtmp01 AS DOUBLE
DIM dtmp02 AS DOUBLE
DIM stemp AS STRING
DIM bfound AS INTEGER
FOR iindex = 0 TO icount - 1
IF bprifunctionfoundflag = False OR LCASE$(spriTokens(iindex)) = "end_function" THEN
SELECT CASE LCASE$(spriTokens(iindex))
'-----------------------------------------------------------------------
' Add Floats
'-----------------------------------------------------------------------
CASE "add_float"
dtmp01 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
ipriStack = ipriStack - 1
dtmp02 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
upriStack(ipriStack).float = dtmp01 + dtmp02
'-----------------------------------------------------------------------
' Add Intgers
'-----------------------------------------------------------------------
CASE "add_int16"
itmp01 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
ipriStack = ipriStack - 1
itmp02 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
upriStack(ipriStack).int16 = itmp01 + itmp02
'-----------------------------------------------------------------------
' Add Longs
'-----------------------------------------------------------------------
CASE "add_int32"
ltmp01 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
ipriStack = ipriStack - 1
ltmp02 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
upriStack(ipriStack).int32 = ltmp01 + ltmp02
'-----------------------------------------------------------------------
' Add Strings
'-----------------------------------------------------------------------
CASE "add_str"
dtmp01 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStack = ipriStack - 1
dtmp02 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStringHeap = ipriStringHeap + 1
upriStack(ipriStack).str = ipriStringHeap
spriStringHeap(ipriStringHeap) = STR$(dtmp01 + dtmp02)
ipriStringHeap = ipriStringHeap + 1
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "callfn"
iindex = iindex + 1
stemp = LCASE$(spriTokens(iindex))
FOR iiterate = 0 TO UBOUND(upriFunctions)
IF RTRIM$(LCASE$(upriFunctions(iiterate).ssource)) = stemp THEN
bfound = True
EXIT FOR
END IF
NEXT iiterate
IF bfound = False THEN
serror "Function not found"
END
ELSE
saveState
SEEK #1, upriFunctions(iiterate).lposition + 2
bpriFunctionExecuting = True
END IF
'-----------------------------------------------------------------------
' Convert value at TOS to float
'-----------------------------------------------------------------------
CASE "cfloat"
itmp01 = upriStack(ipriStack).int16
IF itmp01 <> 0 THEN
upriStack(ipriStack).float = CDBL(itmp01)
upriStack(ipriStack).int16 = 0
ELSE
ltmp01 = upriStack(ipriStack).int32
IF ltmp01 <> 0 THEN
upriStack(ipriStack).float = CDBL(ltmp01)
upriStack(ipriStack).int32 = 0
ELSE
dtmp01 = upriStack(ipriStack).float
IF dtmp01 <> 0 THEN
upriStack(ipriStack).float = CDBL(dtmp01)
upriStack(ipriStack).float = 0
END IF
END IF
END IF
'-----------------------------------------------------------------------
' Convert value at TOS to int16
'-----------------------------------------------------------------------
CASE "cint16"
itmp01 = upriStack(ipriStack).int16
IF itmp01 <> 0 THEN
upriStack(ipriStack).int16 = CINT(itmp01)
ELSE
ltmp01 = upriStack(ipriStack).int32
IF ltmp01 <> 0 THEN
upriStack(ipriStack).int16 = CINT(ltmp01)
upriStack(ipriStack).int32 = 0
ELSE
dtmp01 = upriStack(ipriStack).float
IF dtmp01 <> 0 THEN
upriStack(ipriStack).int16 = CINT(dtmp01)
upriStack(ipriStack).float = 0
END IF
END IF
END IF
'-----------------------------------------------------------------------
' Convert value at TOS to Int32
'-----------------------------------------------------------------------
CASE "cint32"
itmp01 = upriStack(ipriStack).int16
IF itmp01 <> 0 THEN
upriStack(ipriStack).int32 = CLNG(itmp01)
upriStack(ipriStack).int16 = 0
ELSE
ltmp01 = upriStack(ipriStack).int32
IF ltmp01 <> 0 THEN
upriStack(ipriStack).int32 = CLNG(ltmp01)
ELSE
dtmp01 = upriStack(ipriStack).float
IF dtmp01 <> 0 THEN
upriStack(ipriStack).int32 = CINT(dtmp01)
upriStack(ipriStack).float = 0
END IF
END IF
END IF
'-----------------------------------------------------------------------
' Convert value at TOS to string
'-----------------------------------------------------------------------
CASE "cstr"
'-----------------------------------------------------------------------
' Divide Floats
'-----------------------------------------------------------------------
CASE "div_float"
dtmp01 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
ipriStack = ipriStack - 1
dtmp02 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
upriStack(ipriStack).float = dtmp02 / dtmp01
'-----------------------------------------------------------------------
' Divide Integers
'-----------------------------------------------------------------------
CASE "div_int16"
itmp01 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
ipriStack = ipriStack - 1
itmp02 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
upriStack(ipriStack).int16 = itmp02 / itmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "div_int32"
ltmp01 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
ipriStack = ipriStack - 1
ltmp02 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
upriStack(ipriStack).int32 = ltmp02 / ltmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "div_str"
dtmp01 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStack = ipriStack - 1
dtmp02 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStringHeap = ipriStringHeap + 1
upriStack(ipriStack).str = ipriStringHeap
spriStringHeap(ipriStringHeap) = STR$(dtmp02 / dtmp01)
ipriStringHeap = ipriStringHeap + 1
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "end"
'do nothing now
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "end_function"
IF bpriFunctionExecuting = True THEN
bpriFunctionExecuting = False
restoreState
SEEK #1, lpriCurrentBytePos + 2
ELSE
IF bprifunctionfoundflag = True THEN
bprifunctionfoundflag = False
upriFunctions(ipriFunctions - 1).llength = lpriCurrentBytePos - upriFunctions(ipriFunctions - 1).lposition
ELSE
serror "end_function found without matching function"
END
END IF
END IF
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "end_module"
spriModuleName = ""
END
'-----------------------------------------------------------------------
' Declares a function
' TODO: Add code that checks to see if the function has already been
' declared.
'-----------------------------------------------------------------------
CASE "function"
iindex = iindex + 1
stemp = spriTokens(iindex)
bprifunctionfoundflag = True
upriFunctions(ipriFunctions).ssource = stemp
upriFunctions(ipriFunctions).lposition = lpriCurrentBytePos
ipriFunctions = ipriFunctions + 1
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "idiv_float"
dtmp01 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
ipriStack = ipriStack - 1
dtmp02 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
upriStack(ipriStack).float = dtmp02 \ dtmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "idiv_int16"
itmp01 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
ipriStack = ipriStack - 1
itmp02 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
upriStack(ipriStack).int16 = itmp02 \ itmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "idiv_int32"
ltmp01 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
ipriStack = ipriStack - 1
ltmp02 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
upriStack(ipriStack).int32 = ltmp02 \ ltmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "idiv_str"
dtmp01 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStack = ipriStack - 1
dtmp02 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStringHeap = ipriStringHeap + 1
upriStack(ipriStack).str = ipriStringHeap
spriStringHeap(ipriStringHeap) = STR$(dtmp02 \ dtmp01)
ipriStringHeap = ipriStringHeap + 1
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "mod_float"
dtmp01 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
ipriStack = ipriStack - 1
dtmp02 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
upriStack(ipriStack).float = dtmp02 MOD dtmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "mod_int16"
itmp01 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
ipriStack = ipriStack - 1
itmp02 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
upriStack(ipriStack).int16 = itmp02 MOD itmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "mod_int32"
ltmp01 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
ipriStack = ipriStack - 1
ltmp02 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
upriStack(ipriStack).int32 = ltmp02 MOD ltmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "mod_str"
dtmp01 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStack = ipriStack - 1
dtmp02 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStringHeap = ipriStringHeap + 1
upriStack(ipriStack).str = ipriStringHeap
spriStringHeap(ipriStringHeap) = STR$(dtmp02 MOD dtmp01)
ipriStringHeap = ipriStringHeap + 1
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "module"
iindex = iindex + 1
spriModuleName = spriTokens(iindex)
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "mul_float"
dtmp01 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
ipriStack = ipriStack - 1
dtmp02 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
upriStack(ipriStack).float = dtmp01 * dtmp02
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "mul_int16"
itmp01 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
ipriStack = ipriStack - 1
itmp02 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
upriStack(ipriStack).int16 = itmp01 * itmp02
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "mul_int32"
ltmp01 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
ipriStack = ipriStack - 1
ltmp02 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
upriStack(ipriStack).int32 = ltmp01 + ltmp02
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "mul_str"
dtmp01 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStack = ipriStack - 1
dtmp02 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStringHeap = ipriStringHeap + 1
upriStack(ipriStack).str = ipriStringHeap
spriStringHeap(ipriStringHeap) = STR$(dtmp01 * dtmp02)
ipriStringHeap = ipriStringHeap + 1
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "sub_float"
dtmp01 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
ipriStack = ipriStack - 1
dtmp02 = upriStack(ipriStack).float
upriStack(ipriStack).float = 0
upriStack(ipriStack).float = dtmp02 - dtmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "sub_int16"
itmp01 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
ipriStack = ipriStack - 1
itmp02 = upriStack(ipriStack).int16
upriStack(ipriStack).int16 = 0
upriStack(ipriStack).int16 = itmp02 - itmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "sub_int32"
ltmp01 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
ipriStack = ipriStack - 1
ltmp02 = upriStack(ipriStack).int32
upriStack(ipriStack).int32 = 0
upriStack(ipriStack).int32 = ltmp02 - ltmp01
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "sub_str"
dtmp01 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStack = ipriStack - 1
dtmp02 = VAL(spriStringHeap(upriStack(ipriStack).str))
upriStack(ipriStack).str = 0
ipriStringHeap = ipriStringHeap + 1
upriStack(ipriStack).str = ipriStringHeap
spriStringHeap(ipriStringHeap) = STR$(dtmp02 - dtmp01)
ipriStringHeap = ipriStringHeap + 1
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "push_float"
ipriStack = ipriStack + 1
upriStack(ipriStack).float = VAL(spriTokens(iindex + 1))
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "push_int16"
ipriStack = ipriStack + 1
upriStack(ipriStack).int16 = VAL(spriTokens(iindex + 1))
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "push_int32"
ipriStack = ipriStack + 1
upriStack(ipriStack).int32 = VAL(spriTokens(iindex + 1))
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "push_str"
ipriStack = ipriStack + 1
upriStack(ipriStack).str = ipriStringHeap
spriStringHeap(ipriStringHeap) = spriTokens(iindex + 1)
ipriStringHeap = ipriStringHeap + 1
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "print_float"
PRINT upriStack(ipriStack).float
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "print_int16"
PRINT upriStack(ipriStack).int16
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "print_int32"
PRINT upriStack(ipriStack).int32
'-----------------------------------------------------------------------
'
'-----------------------------------------------------------------------
CASE "print_str"
PRINT spriStringHeap(upriStack(ipriStack).str)
END SELECT
END IF
NEXT iindex
ERASE spriTokens
ipriTokens = 0
END SUB
SUB restoreState
DIM iindex AS INTEGER
ipriState = ipriState - 1
lpriCurrentBytePos = lpriOldCurrentBytePos(ipriState)
lpriOldCurrentBytePos(ipriState) = 0
FOR iindex = 0 TO 255
spriTokens(iindex) = spriOldTokens(ipriState, iindex)
spriOldTokens(ipriState, iindex) = ""
NEXT iindex
END SUB
SUB saveState
DIM iindex AS INTEGER
lpriOldCurrentBytePos(ipriState) = lpriCurrentBytePos
FOR iindex = 0 TO 255
spriOldTokens(ipriState, iindex) = spriTokens(iindex)
NEXT iindex
ipriState = ipriState + 1
END SUB
SUB serror (ssource AS STRING)
PRINT ssource
END SUB
|
This took about 10 hours of coding time so far,
-Jeff _________________ www.jqb45.com
|
|
Back to top |
|
|