HP3000-L Archives

April 2005, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Denys Beauchemin <[log in to unmask]>
Reply To:
Date:
Mon, 25 Apr 2005 09:27:38 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (85 lines)
PAGE 0001   HP32100A.08.08 [4W] (C) HEWLETT-PACKARD COMPANY 1987


    1     00000 0   $CONTROL USLINIT
    2     00000 0   BEGIN
    3     00000 1      INTRINSIC PRINT;
    4     00000 1      BYTE ARRAY OUT(0:12);
    5     00000 1      LOGICAL ARRAY L'OUT(*)=OUT;
    6     00000 1      MOVE OUT:="Knock yourself...";
    7     00017 1      PRINT(L'OUT, 6, 0);
    8     00023 1   END.
 PRIMARY DB STORAGE=%002;   SECONDARY DB STORAGE=%00007
 NO. ERRORS=0000;           NO. WARNINGS=0000
 PROCESSOR TIME=0:00:00;    ELAPSED TIME=0:00:00

END OF COMPILE


PAGE 0001   HP32100A.08.08 [4W] (C) HEWLETT-PACKARD COMPANY 1987


    1     00000 0   $CONTROL USLINIT
    2     00000 0   BEGIN
    3     00000 1      INTRINSIC PRINT;
    4     00000 1      BYTE ARRAY OUT(0:12);
    5     00000 1      LOGICAL ARRAY L'OUT(*)=OUT;
    6     00000 1      MOVE OUT:="Knock yourself...";
    7     00017 1      PRINT(OUT, 6, 0);
                                ^
***** WARNING #001 *****  ARITHMETIC RIGHT SHIFT EMITTED

    8     00024 1   END.
 PRIMARY DB STORAGE=%002;   SECONDARY DB STORAGE=%00007
 NO. ERRORS=0000;           NO. WARNINGS=0001
 PROCESSOR TIME=0:00:00;    ELAPSED TIME=0:00:00
 SEE     7

The intrinsic PRINT really wants a word array.

Also, your example, while fine, will not be very useful when you decide to
build an output record with an eye to formatting and such.  You may as well
get used to equivalence or remapping of byte arrays into word arrays.  When
you get to IMAGE and other files, you will need to pass word arrays that you
build from bytes.



Denys

-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf
Of Peter Smithson
Sent: Monday, April 25, 2005 8:52 AM
To: [log in to unmask]
Subject: Re: [HP3000-L] SPL Hello World! program

Thanks for the various replies.  I now have the ultimate Hello World program
with the obvious bug in the first one where I didn't have the text right!
(Using cut & paste from example code) Doh.

$CONTROL USLINIT
BEGIN
  INTRINSIC PRINT;
   BYTE ARRAY OUT(0:12);
   PRINT(OUT, -MOVE OUT:="Hello World!", 0);
END.

I don't get the warning on the PRINT now.

I don't understand why it expects a word array when the documentation -

http://docs.hp.com/en/32650-90821/ch04s177.html

says it's a "character array".  Isn't that a byte array?

Cheers

Peter

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2