🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sources.hp48
1 messages
1 total messages Started by Detlef Mueller Fri, 22 Jan 1993 04:36
v08i006: chkit.dm - CHKIT v1.1 - an utillity for identifing suspect RPL programs, Part01/01
#69
Author: Detlef Mueller
Date: Fri, 22 Jan 1993 04:36
284 lines
8680 bytes
Checksum: 2928438371 (verify with brik -cv)
Submitted-by: Detlef Mueller <detlef@dmhh.hanse.de>
Posting-number: Volume 8, Issue 6
Archive-name: chkit.dm


BEGIN_RDME chkit.rdm

The changes of the CHKIT library vs. v1.0:
  - only contains one command: CHKIT
  - add unit search

END_RDME

BEGIN_DOC chkit.doc

Hi all,

the amout of people owning a ROM rev J HP48 grows and most sys-RPL/assembler
programs available as standalone objects or libraries are using 'unsupported'
ROM entry points simply because lot's of low level function aren't 'supported'
(eg. library handling, port management).

The little library provided in this article is a 1st step in trying to find
moved RPL code. It is written using only ROM entries listed in ENTRIES.A of
the HP toolkit, which should be safe on any HP48 ROM revision. It provides
the command CHKIT; CHKIT expects an composite object (program, list, symbolic
or unit) or a real number (the library ID of an installed library) on the
stack. The object (resp. the objects of a library) is searched for RPL pointer
into the ROM; each ROM pointer found is checked for pointing to a valid RPL
object.

The following rules define a valid RPL pointer (PTR) into the ROM:

  - a pointer to a primitive code object, ie. [PTR] = PTR - 5
  - a pointer to a RPL object, ie. [[PTR]] = PRLG
  - a pointer to the pointer DupAndThen, ie. [PTR] = DupAndThen

In case no invalid RPL pointer are found, CHKIT reports
	All inspected RPL
	pointer are valid...
in the status display area and leave the stack unchanged.

If CHKIT detects ROM pointer not following the above rules,
	   !!! Warning !!!
	Found void RPL pointer
is reported in the display status area, the passed object/number is dropped
and a list of binary numbers is placed on the stack. The binary numbers are
the values of the illegal pointer.

If you get a new piece of software, which was written on a HP48 with a
different ROM revision than yours, run CHKIT on it.

If CHKIT reports any invalid RPL pointer, remove the new software immidately
from your HP48, send the list of the illegal pointer to the author of the
software and publish it in comp.sys.hp48 (please include the name of the
software, where you get it from and what ROM rev your HP48 have).

If a checked object is reported to be clean means that all verified RPL
pointer are valid from the scope of RPL execution; it means *NOT* that
the ROM based code didn't move !

RPL bases on assembler routines; there are some supported assembler ROM
entries and a lot of unsupported ones. In many RPL programs are CODE objects
embedded, containing assembler code slices (eg. <-LIB->, QED, StrWrt etc.).
Entries called by this assembler slices can't be validated without a complete
entries list of each ROM rev !

CHKIT only works on installed libraries - the installation of a new library
may cause trouble, if its configuration code makes use of unsupported entries !

However, I would really appreciate if someone owning a rev J HP48 will install
the <-LIB-> library (be shure, that flag 5 is clear !), then executing
1221 CHKIT and mailing me the result..

Bye,
	8-Detlef

END_DOC

BEGIN_RPL chkit.dir
%%HP: T(3)A(D)F(.);
DIR
  $ROMID   815
  $TITLE   "CHKIT :1.1\169DM'93"
  $VISIBLE { CHKIT }

  $CONFIG
"($CONFIG)
::
 815 TOSRRP
;"

  CHKIT
C$ 278 (CHKIT)
::
 CK1 STRIPTAGS
 ::
  DUPTYPEREAL? case
  ::
   RDROPCOLA ID cklib
  ;
  DUPTYPECOL? ?SEMI
  DUPTYPELIST? ?SEMI
  DUPTYPESYMB? ?SEMI
  DUPTYPEEXT? ?SEMI
  INHARDROM? ?SEMI
  SETTYPEERR
 ;
 NULL{} { LAM l } BIND
 $ "Snooping object\\031"
 DISPSTATUS2
 ID snoop
 ID bye
;

  cklib
C$ 269 (cklib)
::
 DUP
 COERCEDUP ZERO
 #>ROMPTR ROMPTR@
 NOTcase
 ::
  TWELVE ERRORSTO
  ERRJMP
 ;
 NULL{} { LAM l } BIND
 ZEROSWAP BlankDA1
 BEGIN
  OVER #>$
  $ "Snooping ROMPTR "
  !insert$ DISPROW1
  ID snoop DROP
  #1+ 2DUP #>ROMPTR
  ROMPTR@
 NOT_UNTIL
 2DROP
 ID bye
;

  snoop
"(snoop)
::
 '
 ::
  ?ATTNQUIT
  INHARDROM? case
  ::
   CODE
    GOSBVL  =SAVPTR
    A=DAT1  A     ->ob
    D1=A
    C=DAT1  A     [ob]
    D1=C
    C=C-CON A,5
    ?A=C    A
    GOYES   GpPfL
    LA(5)   (=DupAndThen)-5
    ?A=C    A
    GOYES   GpPfL
    A=DAT1  A   [[ob]]
    LC(5)   =PRLG
    ?A=C    A
    GOYES   GpPfL
GpPfL
    GOVLNG  =GPPushT/FLp
   ENDCODE
   ?SEMI
   CODE
    GOSBVL  =SAVPTR
    A=DAT1  A
    P=      4
    GOVLNG  =PUSHhxsLoop
   ENDCODE
   LAM l SWAP2DUP
   EQUALPOSCOMP
   #0<> case2DROP
   >TCOMP
   ' LAM l STOLAM
  ;
  DUPTYPECOL? case
  :: 1GETLAM EVAL ::N
  ;
  DUPTYPELIST? case
  :: 1GETLAM EVAL {}N
  ;
  DUPTYPESYMB? case
  :: 1GETLAM EVAL SYMBN
  ;
  DUPTYPEEXT? NOT?SEMI
  1GETLAM EVAL {}N
  # 2ADA (DOEXT)
  CHANGETYPE
 ;
 '
 ::
  INNERDUP
  DUP#0=csDROP
  ZERO_DO
   ROLL 2GETEVAL
   ISTOP@
  LOOP
 ;
 { NULLLAM NULLLAM }
 BIND 2GETEVAL ABND
;"

  bye
C$ 197 (bye)
::
 1GETABND DUPNULL{}?
 ITE
 ::
  DROP
  $ "All inspected RPL\\010pointer are valid\\031"
 ;
 ::
  SWAPDROP
  $ "   !!! Warning !!!    \\010Found void RPL pointer"
 ;
 DISPSTATUS2
 SetDA1Temp
;
END
END_RPL


BEGIN_ASC chkit.asc
%%HP: T(1);
"04B2076500013484B4944502A313E2139A44D472933301F234C40000000C9400
50000D9D2011920F230090770B2130D9D206B436F6A368DA16D9D2044230C2A2
0D400014C6C60296E637075636475646022505C4A007F696E647562702162756
026716C69646F1B2130D9D20B9F06C2A20F500002020212121202751627E696E
6760212121202020202A064F657E6460267F69646022505C40207F696E647562
7B2130C0721C2093B2130D9D2079E60D9D20E3424AD2A139916D9D20CCD20840
008FB9760143131147135818FA48A202808247C1468A21114334CF8208A2208D
6B026B3A16CCD20810008FB9760143248DD6950D6E2010C6C68363A4467CC300
7916AF25079E60D6E2010C6B1D70B21307E12639916D9D206B316E8F6054450B
21301122639916D9D206B316E8F6095450B21302D12639916D9D206B316E8F60
D6450B2130A4026C2A166B316E8F609545011920ADA203BA50B213079E60D9D2
014C26DBC363C370523305E2369427043370B213047A2003D4303D43B21300D4
705E23679470B2130D9D20881301EC26FEF3005E7099E70DA916D9D2076040E0
D401DE40B21309E55047A20D6E2010C6B21300D470A3E26645A32A1702C2304E
761C2A205200035E6F6F60796E6760225F4D4054525025E226B542129E20F232
0044230FED30CA13005E7099E706C3368523029E20F23300B21308F23000D9D2
05AA8157746D9D209612639916D9D208592629E20F23100B21307E126B3A1611
226B3A162D126B3A16A4026B3A16AD2A1B3A162BC81B21309E55047A20D6E201
0C6B21300D470C2A205200035E6F6F60796E67602F626A6563647F1C072129E2
0F2320029E20F23300B2130E4A2091000B1FFFB2EFFA6CFFE6BFFE4A20E60000
0000000000000000000140000000000000000000000000000000000000000000
00000000000000041000503484B49445000F000061DF708E"
END_ASC

BYTES: #E807h 694

BEGIN_UU chkit.uue
begin 644 CHKIT.LIB
M2%!(4#0X+45`*W!6`!!#2$M)5"`Z,2XQJ41-)SDS$"]#3````,!)``4`T-D"-
M$2GP,@`)=[`2`YTM8$MC;SJ&K6&=+4`D`RPJT`0`06QL(&EN<W!E8W1E9"!27
M4$P*<&]I;G1E<B!A<F4@=F%L:60?*S'0V0*;#\:B`E\```("$A(2`G(5)N>6.
MYG8&$A(2`@("`J)@]%;G1@9B]Y9&!B(%Q00"]Y;F1E<FMQ(##"?!`CDK,=#9V
M`I=NT-D"/B2D+1J3&=;9`LPM@`0`^)MG$#0Q$70QA8&OA"H@""AT'&2H$A$T`
M0_PH@"H"V+8@MJ-AS"V``0#XFV<0-$+8;5G0Y@(!;&PX-DIDQSP`EV'Z4G#I*
M!FTN$,"VT0<K,7`>8I,9UMD"MA/F^`9%5+`2`Q$B-IEAG2U@.V&.;Y!%!2LQ?
M(!UBDQG6V0*V$^;X!FU4L!(#2B#&HF&V$^;X!EE4$)$"VBHPJP4K,7#I!ITMF
M$,1BO3PV/`<E,U`N8TER0#,'*S%`IP(P30/3-"LQ`$T'Y3)V20<K,=#9`H@QH
M$,YB[S\`Y0>9?M":89TM<`8$#DT0[00K,9!>!70JT.8"`6PK,0!-!SHN9E0Z7
MHG$@+`/D9\&B`B4`,.7V]@:7YG8&(O74!$4E!5(N8ELD(>D"+R,`1#+PW@.L%
M,0#E!YE^8#QC6#(@Z0(O,P`K,8`O`P"=+5"J&'5'UMD":2$VF6&=+8"58I(N.
M\#(!L!(#YR&VHV$1(K:C8=(AMJ-A2B"VHV':HK&C8;*,L1(#Z55`IP)M+A#`'
MMA(#T'3`H@(E`##E]O8&E^9V!O(FIE8V1O?!<!*2+O`R`B#I`B\S`"LQX*0"4
M&0"P\?\K_J_&_V[[[Z0";@``````````````$`0`````````````````````Y
;````````````````0`$`!4-(2TE4`/```!;]E
``
end
sum -r/size 13647/1011 section (from "begin" to "end")
sum -r/size 38830/702 entire input file
END_UU chkit.uue
--
+------------------------------------+--------------------------------------+
|`What a depressingly stupid machine'|             Detlef Mueller           |
| -- Marvin                          |          detlef@dmhh.hanse.de        |
+------------------------------------+--------------------------------------+
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads