> Buy that man a drink
Chocolate Milk is my vice of choice.
Hershey's powder - NOT Nestle's Quik - in whole milk (OK, yeah,
Half&Half, but I'm trying to cut back.)
> - that is exactly what it was.
> There was an $Include that contained an equate statement that
> equated CALL.TRANS.WRITE.SUB TO 'CALL subroutine'
>
> Excellent job Charles and much thanks !!!!
Sure, spaghetti code is not the only way to deceive:
Here's a program that counts to 10 (explanation at bottom) :
>CT CDS.BP ROSES
ROSES
0001 $INCLUDE UNIVERSE.INCLUDE XML.H
0002 Roses.are.red
0003 Violets.are.blue
0004 Sugar.is.sweet
0005 And.so.are.you
>
>BASIC CDS.BP ROSES
Compiling: Source = 'CDS.BP/ROSES', Object = 'CDS.BP.O/ROSES'
Compilation Complete.
>
>RUN CDS.BP ROSES
1
2
3
4
5
6
7
8
9
10
>
>
>
> From: Stevenson, Charles
>
> ten chances out of nine there is an $INCLUDE that has an
> EQUATE buried
> in it:
>
> EQUATE CALL.TRANS.WRITE.SUB LIT "CALL *TRANS.WRITE.SUB(
> FILE.VAR, ID,
> REC )"
>
> If this is universe, compile with -L option & look at the listing.
> and do a VLIST to see what this actually compiles to.
>
> cds
>
> > We have 'new' programs from a package I need now
> > support. There is a Basic statement that I have never seen in
> > my 20+ years. Hopefully, one can shed a little light for me...
> >
> > CALL.TRANS.WRITE.SUB (that's a dot tween CALL and TRANS
> > not a space)
Solution: 1st I changed the voc pointer to UNIVERSE.INCLUDE from what it
should be:
NEWACC UNIVERSE.INCLUDE
01 File - Standard BASIC program headers
02 /dbms/uv/INCLUDE
03 /dbms/uv/D_INCLUDE
to something rediculous:
VOC UNIVERSE.INCLUDE
01 F
02 sneaky.sneaky
03 /dbms/uv/D_INCLUDE
then I invented my own absurd replacement for the UV-supplied
UNIVERSE.INCLUDE XML.H include:
UNIVERSE.INCLUDE XML.H
01 EQU Roses.are.red LIT "FOR I = 1 TO 10"
02 EQU Violets.are.blue LIT "CRT I"
03 EQU Sugar.is.sweet LIT "NEXT I"
04 EQU And.so.are.you LIT "STOP"
Truth is also revealed by compiling with -L option:
>BASIC CDS.BP ROSES -L
Compiling: Source = 'CDS.BP/ROSES', Object = 'CDS.BP.O/ROSES'
Compilation Complete.
>CT CDS.BP.L ROSES
ROSES
0001 CDS.BP.L/ROSES Source Listing
0002
0003 000001 $INCLUDE UNIVERSE.INCLUDE XML.H
0004 INCLUDEd file is 'sneaky.sneaky/XML.H'
0005 0001.01 EQU Roses.are.red LIT "FOR I = 1 TO 10"
0006 0002.01 EQU Violets.are.blue LIT "CRT I"
0007 0003.01 EQU Sugar.is.sweet LIT "NEXT I"
0008 0004.01 EQU And.so.are.you LIT "STOP"
0009 0005.01
0010 000002 Roses.are.red
0011 000003 Violets.are.blue
0012 000004 Sugar.is.sweet
0013 000005 And.so.are.you
0014 000006
>
VLIST is also revealing:
>VLIST CDS.BP ROSES
00001: $INCLUDE UNIVERSE.INCLUDE XML.H
00002: Roses.are.red
00002 00000 : 0F8 move 0 => I
00002 00006 : 098 forincr I 10 1 00020:
00003: Violets.are.blue
00003 00014 : 046 crtcrlf I
00004: Sugar.is.sweet
00004 0001A : 0C2 jump 00006:
00005: And.so.are.you
00005 00020 : 190 stop
00006 00022 : 190 stop
>
I try to write all my programs with this technique for job security.
Chuck Stevenson
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/