Home · Articles · Downloads · Hobby Wear · Forums · Web Links · News CategoriesSunday, January 21, 2018
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,021
Newest Member: pd123d
PdfFactory Pro Enterprise 2.31, MATFOR 4.00.061031 in Lahey Fortran, Adobe PhotoShop 9.0 CS2 oem, Trend Micro InterScan VirusWall 6.0, Adobe Acrobat 7.0 Professional sale, Salon Iris 5.05, Drafix Pro Landscape 11.2, oem Adobe PhotoShop CS 8.0 cheap buy, Catia 5 R12 P3 with SP2, Mcafee Secure Internet Gateway 4.5, oem Adobe Acrobat Professional 8 oem, Visual UML 4.1 Developer Edition, sale Adobe CS3 Design Premium Vol for Mac low price, Nuance Dragon Naturally Speaking 9.0 Professional With SP1, Adobe After Effects Plugins, low price AutoCAD 2006 cheap buy, Avid NewsCutter XP 3.8, The Movie Library 1.7.11, oem Adobe Creative Suite Premium Edition 2.0, ProFlyers 6.0 PDF Forms for Adobe Acrobat, PTC Pro Engineer Routed Systems Designer 5.0, sale DVDXCopy Platinum 4.0.38, CyberBizPlan v1.0.165 WinAll, NeverCenter Silo 1.16b, cheap buy AutoCAD 2005, Norton Save And Restore 11, sale Adobe Creative Suite 3 Design Premium sale, Adobe Premiere Plugins Collection 2007, cheap buy Adobe Creative Suite Premium Edition 2.0 for Mac sale, Active Desktop Calendar 6.5.061124, sale Adobe Acrobat 6.0 Professional, X-Rite MonacoPROFILER Platinum 4.8, EmailUnlimited 6.1 Win98NTME, oem Adobe Photoshop CS3 Extended sale
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: 443
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
December 12 2017
HPE only makes the most current version of OpenVMS Alpha / IA64 /VAX available to hobbyists. When I had access to the Alliance 1 program it was the same. No public downloads are allowed by HPE.

nmbonao
December 08 2017
Is anybody knows OpenVMS 8.2 version downloadable version? or CD copy? Thank you very much

aarommes
December 02 2017
Bitcoin and Blockchain enthusiasts ( plus distributed computing ) please connec / reply: http://www.openvmshobbyis
t.com/forum/viewthread.ph
p?forum_id=130&thread_id=
2991


malmberg
September 10 2017
https://sourceforge.net/p
/vms-ports/wiki/VMSInstal
lation/ For the most part just use VMS 6.1 media instead of 7.3. But why run the older release?


DoeveR
August 07 2017
Where can I find the write up on running VMS 6.1 using the simh emulator?

Bart
March 20 2017
Happy to have found my password again!

pintero
March 16 2017
peteherrera. Agreed.

peteherrera
March 04 2017
It would be nice to be able to buy the lastest hardcopy full OpenVMS docset at a very reduced price through the Hobbyist program. smiley

malmberg
February 05 2017
Decus > Connect > Encompass<Country>

ChrisChiesa
February 02 2017
What's the status of DECUS memberships? Just found my membership card. :-)

bofh
January 06 2017
Searching for Pathworks 6.0 for DOS & Windows. Anyone have it?

malmberg
December 29 2016
The openvms disks question is frequently answered in the forums, and is not something to ask about in the shout box.

Cmota
December 29 2016
Hello, I am in need of the openvms.disk, but I don't know where to obtain it

moch75
December 26 2016
personal alpha

moch75
December 24 2016
personal alpha+

Shoutbox Archive