[Info-vax] VAX Common Lisp

Arne Vajhøj arne at vajhoej.dk
Tue Oct 25 19:39:34 EDT 2022


On 10/25/2022 7:38 PM, Arne Vajhøj wrote:
> On 10/24/2022 8:50 PM, Dave Froble wrote:
>> I don't know anything about LISP, and I don't know if a process image 
>> is re-startable.  Seems to me there might be a bit more to it.
> 
> If the data being the context are isolated then VMS
> does have a few relevant features.
> 
> Basic (!) example:
> 
> $ type data.bas
> map (blk) integer accu
> $ type sum.bas
> program sum
> 
> %include "data.bas"
> declare integer v
> 
> v = -1
> while v <> 0
>      input v
>      accu = accu + v
> next
> print "sum = ", accu
> 
> end program
> $ bas sum
> $ link sum
> $ run sum
> 1
> 2
> 3
> 0
> sum =          6
> $
> $ run sum
> 1
> 2
> 3
> 0
> sum =          6
> $
> $ run sum
> 1
> 2
> 3
> 0
> sum =          6
> $
> 
> [something]
> 
> $ type data.bas
> map (blk) integer accu
> $ type sum.bas
> program sum
> 
> %include "data.bas"
> declare integer v
> 
> v = -1
> while v <> 0
>      input v
>      accu = accu + v
> next
> print "sum = ", accu
> 
> end program
> $ bas sum
> $ link sum + hack/opt ! <---- note the small change
> $ run sum
> 1
> 2
> 3
> 0
> sum =          6
> $
> $ run sum
> 1
> 2
> 3
> 0
> sum =          12
> $
> $ run sum
> 1
> 2
> 3
> 0
> sum =          18
> 
> :-)
> 
> Explanation in next post.

$ type hack.bas
sub hack

%include "data.bas"

end sub
$ bas hack
$ link/share hack+sys$input/opt
SYMBOL_VECTOR=(blk=PSECT)
PSECT_ATTR=blk,SHR
$
$ set proc/priv=(cmkrnl,sysnam)
$ install
remove disk2:[arne]hack.exe
add disk2:[arne]hack.exe /share/write
exit
$ define/sys/exe/nolog hackshr disk2:[arne]hack.exe
$ type hack.opt
PSECT_ATTR=blk,SHR
hackshr/SHARE

Arne





More information about the Info-vax mailing list