PX-8 Technical Information

Wå havå recentlù beeî graciouslù supplieä bù Epsoî Americá witè 
oæ gooä deaì oæ technicaì informatioî oî thå PX¬ informatioî thaô 
supplementó manù areaó noô founä iî thå PX-¸ Systeí Essentialó 
Guide®  Thå followinç discussioî oæ USERBIOÓ originateó froí thió 
documentation®  Iæ therå arå otheò areaó oæ technicaì informatioî 
thaô yoõ woulä likå presenteä here¬ pleaså leô uó know¬ anä wå 
shall do our best to present them.

USERBIOS

Thå PX-¸ Systeî Essentialó Manuaì listó amä explainó mosô oæ thå 
BIOÓ calló oæ thå PX®  Onå particulaò call thaô ió noô explained¬ 
howeveò ió USERBIOS®  Thå folowinç discussioî illustrates the uså 
of this call.

USERBIOÓ ió onå oæ thå extendeä CP/Í BIOÓ calló oæ thå PX-8®  Iô 
provideó aî entrù poinô througè whicè aî applicatioî prograí caî 
makeó BIOÓ calló afteò loadinç itó owî BIOÓ routinå iî thå RAÍ 
USERBIOS area.  It neither requires nor returns any parameter.

Thå followinç procedurå musô bå observeä wheî usinç á user-
provided BIOS routine through the entry point at USERBIOS.

1) Load the BIOS routine into the RAM USERBIOS area.

2© Replacå thå contentó oæ addreseó (WBOOÔ « 7EH© « ± anä (WBOOÔ 
+7EH© « ² witè thå entrù addresó byteó oæ thå useò routinå iî thå 
USERBIOS area.

3) Call this BIOS in an application program.




Notes on Programming the USERBIOS Area

Thå user BIOÓ areá maõ bå shareä bù morå thaî onå prograí oò blocë 
oæ datá bù placinç á 1¶ bytå headeò aô thå enä oæ thå area®  Thå 
headeò ió useä bù thenapplicatioî prograí tï checë whetheò thå 
program or data to be used ia available in the user BIOS area.

Thå headeò ió alwayó locateä aô EBF0H-EBFFÈ sincå thå bottoí 
addresó oæ thå user BIOÓ areá ió fixed¬ whilå thå toð addresó 
differs depending on the size user BIOS.


1) The header ID, 2 bytes in length, and fixed to "UB".

2© Thå routinå name¬ ¸ byteó iî length®  Thå namå oæ thå routinå 
loadeä iî thå useò BIOÓ area®  Anù namå maù bå specifieä iî ASCII¬ 
as long as it is not used in another routine.

3© Thå sizå oæ thå routinå loadeä intï thå useò BIOÓ areá iî 256-Šbyte units stored in binary.  This is 1 byte in length.

4© Thå overwritå flaç indicateó hwetheò thå currentlù loadeä 
routinå caî bå overwritten®  Thió ió alsï ± bytå anä iæ seô tï 00È 
disables the overwrite feature.  

5© Thå releaså addresó area®  Thå processinç routinå aô thió 
addresó ió executeä beforå á routinå currentlù loadeä iî thå useò 
BIOÓ areá ió overwritteî bù á ne÷ routine®  Thió releaså 
processinç routinå maù bå executeä onlù wheî thå overwritå flaç 
foò thå currentlù loadeä routinå ió seô tï 00H®  Thå relaeså 
addresó musô falì withiî iî thå useò BIOÓ area®   Thå releaså 
processing routine must end with a RET instruction.

6) Not used and fixed to 00H.

7© Thå checksum¬ whicè ió laodeä witè thå resilô obtaineä bù 
subtractinç thå contentó oæ thå 1µ byteó (froí thå headeò toð tï 
thå iteí preceedinç checksum© froí 00H¬ sequentiallù onå bytå aô á 
time®  Thió resulô ió useä foò checkinç thå validitù oæ thå headeò 
data.

Overwrite Flag and Release Processing Routine

Seô thå overwritå flaç tï 00È wheî loadinç á routinå whicè musô bå 
residenô iî thå useò BIOÓ areá (sucè aó scheduleò residenô 
routines© oncå iô ió loaded®  Thió routinå caî bå deleteä froí thå 
useò BIOÓ areá onlù bù thå prograí thaô loadeä it®  Foò routineó 
thaô allo÷ loadinç oæ ne÷ routineó afteò executioî oæ á releaså 
processinç routinå, á nonzerï valuå musô bå specifieä tï allo÷ á 
ne÷ routinå tï bå loadeä intï thå useò BIOÓ areawheî thió areá caî 
bå restoreä tï thå originaì statå afteò thå executoî oæ á releaså 
processinç routine®  Seô thió flaç tï á nonzerï valuå foò routineó 
whicè alteò thå systeí areá aô loaä time¬ buô whicè caî restorå 
thå systeí areá intï thå originaì statå bù executinç thå releaså 
processing routine and loading a new one into the user BIOS area.

Á useò BIOÓ routinå whicè ió tï modifù thå contentó oæ thå systeí 
areá ¨ hooë oò jumð table¬ foò example© musô savå thå originaì 
contentó oæ thå ssyteí areá intï thå useò BIOÓ areá beforå 
startinç execution®  Thå releaså processinç routinå ió calleä tï 
restorå thå systeí intï thå statå  beforå thå useò BIOÓ routinå ió 
loadeä bù placinç thå saveä contentó bacë intï thå systeí areá anä 
settinç alì headeò fieldó tï 00H®  Thå headeò musô bå cleareä eveî 
iæ thå systeí areá neeä noô bå restoreä tï thå originaì state®  
Thå releaså processinç routinå musô bå placeä iî thå highesô 25¶ 
bytes (including the header) of the user BIOS area.


Using User BIOS with an Application Program

Thå applicatioî prograí musô verifù thaô thå useò BIOÓ routinå ió 
availablå beforå accessinç thå routine®  Thå procedurå illustrateä 
below must be followed to check this.
Š
***********************
FIGURE TO BE TYPSET
***********************

(A© Checkó whetheò thå correcô headeò ió presenô bù matchinç thå 
headeò IÄ witè "UB¢ anä checksum®  Iæ thå headeò IÄ fielä containó 
"US"¬ iô ió unconditionalù concludeä thaô thå scheduleò ió usinç 
the user BIOS area because it defines the header as "US".

(B© Checë tï determinå whetheò thå requireä useò BIOÓ routinå ió 
loadeä intï thå seò BIOÓ areá bù checkinç thå routinå namå iî thå 
header.

(C© Calì thå routinå addresseä bù thå releaså addresó iî thå 
header.

(D© Loaä á ne÷ routinå tï thå useò BIOÓ areá anä updatå thå headeò 
contents.



Compiling PX-8 BASIC Programs


Therå ió nï specifiã compileò designeä foò thå versioî oæ BASIÃ 
implementeä oî thå PX-8®  MicroSoft'ó BASCOÍ wilì worë tï á 
certaiî degreå witè PX-¸ BASIC¬ however®  Iô ió availablå iî ³ 1/² 
disë formaô foò uså oî thå PF-1° froí SofTeaí (800-438-7638)®   
Daviä Westerî haó takeî thå timå tï outlinå thå specifiã areaó oæ 
incompatiilitù betweeî BASCOÍ anä thå versioî oæ BASIÃ oî thå PX¬ 
witè certaiî suggestionó oî ho÷ tï overcomå somå oæ theså 
descrepencies.  Here are his comments.




Herå ió á lisô oæ manù importanô commandó thaô É havå founä tï bå 
incompatablå iî somå waù anä á correspondinç solutioî whereveò 
possible.

                        by David Western
-----------------------------------------------------------------  

Alì commandó commonlù entereä oî thå commanä linå sucè aó LIST¬ 
AUTO¬ LOAD¬ anä SAVÅ caî noô bå used® Otheò fileó caî bå chained¬ 
however, using the PX-8 compatable CHAIN command.

ALARM¤    Nonå oæ thå alarí functionó worë iî BASCOM®  É havå founä 
          nï waù otheò thaî á machinå languagå routinå tï fiø 
          thió problem.

BEEÐ      Thå onlù thinç yoõ caî dï tï makå mucè noiså iî BASCOÍ 
          is to use PRINT CHR$(7) to activate the bell. 
ŠCLS       Use PRINT CHR$(12) instead of CLS.

FRE(0)    This will return 0 according to the BASCOM manual.

INSTÒ     Thå INSTÒ functioî ió noô supported® Herå ió á shorô 
          routinå tï dï thå samå thing® A¤ containó thå strinç 
          yoõ arå searchinç anä E¤ containó thå strinç yoõ arå 
          findinç iî A$® Ú returnó thå positioî wherå founä oò ° 
          if not found.

          1000 FOR I=1 TO LEN(A$)
          101° IÆ MID$(E$,I,LEN(E$))=MID$(A$,I,LEN(E$)© THEÎ 
               X=I:RETURN
          1020 NEXT I
          1030 X=0:RETURN

LINÅ      LINÅ ió noô supported® Herå ió aî ESC sequencå thaô 
          wilì dï thå samå thinç oncå iî SCREEÎ 3® Uså thå waù 
          listeä herå tï geô intï thaô screeî mode.

          PRINÔ CHR$(27);CHR$(198);CHR$(X1);CHR$(X2);CHR$(Y1);
                CHR$(Y2);CHR$(X3);CHR$(X4);CHR$(Y3);CHR$(Y4);
                CHR$(Z1);CHR$(Z2);CHR$(Z3);

          X1 = 1st byte of 1st X coordinate
          X2 = 2nd byte of 1st X coordinate
          Y1 = 1st byte of 1st Y coordinate
          Y2 = 2nd byte of 1st Y coordinate
          X3 = 1st byte of 2nd X coordinate
          X4 = 2nd byte of 2nd X coordinate
          Y3 = 1st byte of 2nd Y coordinate
          Y4 = 2nd byte of 2nd Y coordinate
          Z1 = 1st byte of mask pattern
          Z2 = 2nd byte of mask pattern
          Z3 = 1 for OFF, 2 for ON, 3 for COMPLIMENT
.paŠ          LINE (400,18)-(18,18) is
 
          PRINT CHR$(27);CHR$(198);CHR$(1);CHR$(144);
          CHR$(0);CHR$(18);CHR$(0);CHR$(18);CHR$(0);CHR$(18);
          CHR$(&HFF);CHR$(&FF);CHR$(2);  

LOCATÅ    Herå ió aî ESÃ sequencå tï uså aó LOCATÅ doeó noô worë 
          with BASCOM.

          PRINT CHR$(27);"=";CHR$(Y+31);CHR$(X+31);
          X and Y stand for the X and Y position.
          
OPEÎ      Onlù fileó thaô accesó thå disë driveó caî bå used® Alì 
          otheò specó arå considereä parô oæ thå filename® IÎ anä 
          OUÔ musô bå useä alonç witè á calì tï thå opeî routinå tï 
          directlù uså thå PX-¸ RS23² port® LPRINÔ workó fine¬ 
          though.

OPTION    Optioî Countrù ió noô supporteä iî BASCOM® Iî ordeò tï uså 
COUNTRY   thió featurå yoõ musô uså thå procedurå describeä oî pageó 
          C-3 and C-4 of the PX-8 BASIC manual.

OPTION    Optioî Currencù doeó noô worë anä É caî finä nï controì 
CURRENCY  sequence to remedy this.

PCOPY     PCOPÙ ió noô useä aó therå arå noô seperatå BASIÃ areaó iî 
          the BASIC compiler at this time.

POINT     Thå POINÔ command¬ whicè returnó thå statuó oæ á doô oî thå 
          screen¬ ió noô implemented® Iô woulä bå possiblå tï peeë thå 
          graphicó memorù tï geô thió buô É don'ô kno÷ wherå thaô ió 
          oò ho÷ iô ió formatted® É wisè iô DIÄ worë becauså theî É 
          coulä compilå mù OKIDATÁ screeî dumð routinå whicè takeó 
          forever in BASIC.

POWER     Alì oæ thå POWEÒ commandó (POWEÒ OFF¬ CONT¬ oò RESUME© dï 
          not work. I know of no remedy for this either.

PRESET    PRESEÔ caî bå donå bù usinç controì sequences® Thå samå 
          basiã sequencå ió useä bù botè PSEÔ anä PRESET® Á fulì 
          descriptioî ió oî pagå C-¸ anä C-¹ oæ thå PX-¸ BASIÃ manuaì 
          under the section for ESC CHR$(199).

SCREEN    Thå SCREEÎ commanä alonç witè alì oæ itó optionó arå 
          supporteä bù controì codes® Alì oæ theí arå oî pagå C-¹ oæ 
          thå BASIÃ manuaì undeò thå sectioî describinç ESÃ CHR$(208)® 
          All Features are supported using these.

SOUND     É kno÷ oæ nï waù tï uså SOUNÄ iî BASCOM® É imaginå therå arå 
          routineó yoõ caî calì buô EPSOÎ doesn'ô seeí tï thinë anyonå 
          would be interested. 

STAT      STAÔ ió noô handleä iî anù way¬ buô therå ió nï reaì neeä 
          for it.
STOP KEY  É caî finä nï alternativå foò thå STOÐ KEÙ command¬ buô É aí Š          prettù surå therå ió one® Iæ anyonå knowó oæ aî MBASIÃ 
          commanä oò routinå tï dï thió pleaså notifù someonå abouô 
          it.

TAPCNT    TAPCNÔ caî noô bå useä thougè É aí surå therå ió somå 
          locatioî thaô caî bå peekeä foò thå value® I'í noô aî experô 
          oî thå speciaì memorù locationó foò thå PX-¸ aó therå ió nï 
          information for it that I can get a hold of.

TIME$     Nï timå routineó arå present® Thió waó becauså alì TIMÅ 
          routineó arå differenô anä Microsofô wanteä tï makå surå 
          BASCOÍ workeä oî mosô CP/Í machines® Therå ió á machinå 
          language routine for it floating around somewhere...

TITLE     TITLE is not used as multiple program areas are not used.

WIND      Nï commanä tï controì thå micro-cassette'ó motoò coulä bå 
          found though it is likely that one exists.

     Thaô ió thå enä oæ thå list® É hopå thaô iô haó proveä helpfuì tï 
PX-¸ Genevá users® Iæ anyonå haó anythinç tï adä tï thå lisô theî 
logiî tï thå SOCIÓ Epsoî Connectioî BBÓ anä leavå maiì tï Daviä 
Westerî oò Boâ Hermann® Otherwiså calì Thå Boarä Rooí aô 
(803© 548-1243 and leave mail to the SYSOP or upload the file.

