[Info-vax] Writer advice requested
Peter Weaver
info-vax at weaverconsulting.ca
Wed Nov 24 14:07:43 EST 2010
On Nov 18, 8:51 pm, MetaEd <met... at gmail.com> wrote:
> On Nov 13, 2:35 am, Bob Eager <rd... at spamcop.net> wrote:
>
> > On Fri, 12 Nov 2010 21:30:24 -0600, Charles Sandmann wrote:
> > > Clear to anyone who's worked on a PDP. The VaxStation 4000 was
> > > offended until I explained the "other" reference. Cute reply.
> > Exactly.
>
> SPOILER AHEAD
>
> Cheers to Bob and Charles.
>
> The message is a string of numbers in octal notation. Rewrite each
> number in Radix 50 notation (i.e., quadragesimal notation), using
> the notational convention common to DEC sixteen bit systems (and the
> VAX-11). The resulting numerals are readable as text. For example,
> the numbers 054746 and 004115 (octal) equal NON and AME
> (quadragesimal). They can be read as the file name "NONAME".
>
> Cheers,
>
> MetaEd
I'm a bit late to the game here, but if anyone has not figured it out
yet here is a liitle .COM I wrote for some reason;
$ rad50 = f$integer(p1)
$!
$ chars=" ABCDEFGHIJKLMNOPQRSTUVWXYZ$.%0123456789"
$ pos = 2
$ string = " "
$!
$loop:
$ tmp = rad50 - rad50 / %O50 * %O50
$ rad50 = rad50 / %O50
$ string[pos*8,8] = f$cvui(0,8,f$extract(tmp,1,chars))
$ pos = pos - 1
$ if pos .ge. 0 then goto loop
$ write sys$output string
$!
Call it with;
$ @rad502asc %O054754
$ @rad502asc %O031566
etc.
Peter Weaver
http://www.weaverconsulting.ca
Winner of the OpenVMS.org Readers' Choice Award for System
Management/Performance
http://www.linkedin.com/in/peterweaver
More information about the Info-vax
mailing list