pirsrc.txt

            pirate source files documentation



  source files:

user RPL (string or list) :

 dialog         dialog strings
 direction      direction strings
 i0s            object names
 msg            message strings
 nv1s           nouns & verbs 1
 nv2s           nouns & verbs 2
 object         object descriptions
 piece          place descriptions
 wmsg           welcome messages


assembler:
 c0.a           action codes array

system RPL:

 affi1.s        display a string to the bottom row (#10)
 affiche.s      display a list of string (max. 9) to the screen
 analg.s        parse a input string, and extract codes of recognized words
 cesure.s       cesure: cut a string into a list of strings of len<n
 chmot.s        search for a key word in a list
 clrscr.s       clear screen buffer
 defvar.inc     local variables def file (include file)
 descr.s        describe the place
 doces.s        do cesure: cut a string at space position
 getch.s        get character from keyboard
 gets.s         input a string from keyboard with minimum editing
 i2.s           object locations at startup
 pirmain.s      pirate main program
 putsb.s        put a system binary into an array (primitive in asm)
 r1.s           allowed moves per place
 rdact.s        read an action code
 sconfig.s      configuration object for HP48 library
 tract.s        action treatement
 trai0.s        action treatement 0
 trai2.s        action treatement 2
 trcond.s       condition treatement
 trdepl.s       move treatement
 trlig.s        light treatement
 trobj.s        object treatement
 welcome.s      welcome screens
 wrtstr.s       format and display a string on screen

Note that the comments in source file are still in french. I don't attempt
to translate it. If someone needs it, contact me.


Call tree :

 pirmain
   welcome
     affiche
     affi1
   clrscr
   descr
     wrtstr
   trai0
     trcond
     tract
   affi1
   gets
   analg
     chmot
   trai2
     trdepl
     trcond
     tract
     trobj
     wrtstr




Tools to build pirate.lib
  I use the HP tools rplcomp, sasm, sload and usrlib.
  Remember to define the SASM_LIB environnement variable in your autoexec.bat.
  Kermit 2.32 is used to tranfer from/to the PC.
  With Win95, kermit 2.32 runs better in a full DOS window.


How to build pirate.dir:
 Create and select the pirate.dir on the HP48
   'PIRATE.DIR' CRDIR
 Transfer the user RPL objects with kermit:
   kermit s  dialog directio i0s msg nv1s nv2s object piece wmsg
 Assemble the asm source file c0.a with mkc0, and transfer it:
   mkc0
   kermit s c0
 Compile and transfer the system RPL objects with a make utility:
   make
 (Create a subdirectory 'obj' in your src dir. on PC.)
 During the development, it is usefull to set flag -36.


To buid the library, define the following objects in PIRATE.DIR :
$VISIBLE: { PIRMAIN }
$CONFIG with the content of SCONFIG (see sconfig.s above)
$TITLE: "PIRAT :Pir. Adventure"
$ROMID: 1056

If you just want to change a few objects, you can directly download the
PIRATE.DIR into the HP48 and update only the edited objects.

Then upload PIRATE.DIR into the PC, and use usrlib to build the library :
  usrlib pirate.dir pirate.lib




jfgarnier@wanadoo.fr


