Home · Articles · Downloads · Hobby Wear · Forums · Web Links · News CategoriesMonday, August 08, 2022
Navigation
Home
Articles
Downloads
Hobby Wear
FAQ
Forums
Web Links
News Categories
Contact Us
Photo Gallery
OpenVMS Bigot
Search
Users Online
Guests Online: 1
No Members Online

Registered Members: 7,660
Newest Member: jdevries
Sponsors
Island Computer
View Thread
OpenVMS Hobbyist Program | Hobbyists and OpenVMS | Porting Open Source to OpenVMS
Author Frotz working, but exits oddly
lexthehex
Member

Posts: 6
Location: Devon, UK
Joined: 19.02.08
Posted on July 21 2010 21:12
Greetings.

I recently got the Frotz ZCode interpreter working on VAX OpenVMS. Although it runs, it exits with an error. If someone could tell me where I went wrong here, I'd be grateful! The error only appears if Frotz doesn't run any games. I'm guessing that it's something to do with the way that VMS interprets the return code.

For this run, it errs on exit. It looks bad ('access violation'!), but it isn't, is it?


$ frotz -h
option requires an argument -- h
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=851E411B, PC
=000E1172, PSL=0BC00008
%TRACE-F-TRACEBACK, symbolic stack dump follows
module name routine name line rel PC abs PC

000E1172 000E1172
0006F479 0006F479
0006F7B7 0006F7B7
0006FAF0 0006FAF0
000706E9 000706E9
DUMB_INIT os_process_arguments 4481 000001A4 0000FA7C
MAIN main 2227 0000002B 000067F7


For this run, it exits okay.


$ frotz [-.ZIP.DATA]ZORK1.DATA
West of House Score: 0 Moves: 0

ZORK I: The Great Underground Empire
Copyright (c) 1981, 1982, 1983 Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc.
Revision 88 / Serial number 840726

West of House
You are standing in an open field west of a white house, with a boarded
front door.
There is a small mailbox here.

>get mailbox
West of House Score: 0 Moves: 1

It is securely anchored.

>quit
Your score is 0 (total of 350 points), in 1 move.
This gives you the rank of Beginner.
Do you wish to leave the game? (Y is affirmative): >y


This is my second attempt at getting an open-source application to run on VMS. Since my VMS is running in SIMH, I'm wondering if I could run SIMH in VMS in SIMH (I like recursive emulation). smiley
15101050 http://brooknet.no-ip.com/
Author RE: Frotz working, but exits oddly
malmberg
Moderator

Posts: 530
Joined: 15.04.08
Posted on July 25 2010 19:16
The access violation is a bug, either in the original code or the port, because a stack trace is being generated. If you were simply returning the same code for an access violation, no stack trace would be generated.

Tracing it down needs more information. Running a debug version of the ported code with the debugger set to break on exception, and then do a show calls.

All code ported from Unix needs to be compiled with the _POSIX_EXIT=1, and that the main() routine needs to explicitly call exit(xxx) instead of having main exit or a return from main(). The newer Alpha/IA64 compilers have a /MAIN=POSIX_EXIT that will make sure of this, but for VAX, you have to do this manually.

If you do not make sure that the POSIX version of exit() is called, then you need to make sure that the program only returns valid VMS exit status codes instead of Unix ones.

http://encompasserve.org/anon/htnotes/range?f1=PORTING_TO_VMS&f2=11.*&f4=t

One way of handling it is to use a #define main old_main, and create a new main() { exit(old_main) } routine that calls it to make sure that the posix variant of the exit() call is made.

The porting_to_vms conference has a lot of information about porting applications to VMS. Membership in Encompasserve.org is free.
Jump to Forum:
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Member Poll
Are you going to OpenVMS Boot Camp 2016?

Yes

No

You must login to vote.
Shoutbox
You must login to post a message.

malmberg
August 04 2022
No more VAX hobbyist licenses. Community licenses for Alpha/IA64/X86_64 VMS Software Inc. Commercial VMS software licenses for VAX available from HPE.

ozboomer
July 20 2022
Just re-visiting.. No more hobbyist licenses? Is that from vmssoftware.com, no 'community' licenses?

valdirfranco
July 01 2022
No more hobbyist license...sad

mister_wavey
February 12 2022
I recall that the disks failed on the public access VMS systems that included Fafner

parwezw
January 03 2022
Anyone know what happened to FAFNER.DYNDS.ORG? I had a hobbyist account here but can longer access the site.

gtackett
October 27 2021
Make that DECdfs _2.1A_ for Vax

gtackett
October 27 2021
I'm looking for DECdfs V2.4A kit for VAX. Asking here just in case anyone is still listening.

MarkRLV
September 17 2021
At one time, didn't this web site have a job board? I would love to use my legacy skills one last time in my career.

malmberg
January 18 2021
New Hobbyist PAKs for VAX/VMS are no longer available according to reports. Only commercial licenses are reported to be for sale from HPE

dfilip
January 16 2021
Can someone please point me to hobbyist license pak? I'm looking for VAX/VMS 7.1, DECnet Phase IV, and UCX/TCPIP ... have the 7.1 media, need the license paks ... thanks!

Bart
October 16 2020
OpenVMS, and this website!

malmberg
September 05 2020
VSI community non-commercial licenses for AXP/IA64 are available now.

malmberg
September 05 2020
See the forum about licensing. Don't know if HPE hobby licenses still being issued. Commercial licenses still being sold.

silfox70
September 01 2020
I need the license for OpenVMS7.3. Where can I find them?

malmberg
August 29 2020
Eisner, which is currently being moved, got an SSH update and the keys were updated to more modern encryption standards.

Shoutbox Archive