HP3000-L Archives

May 1998, Week 2

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:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Wed, 13 May 1998 19:03:22 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
Re:
> routines. I wrote a switch stub to call HPDATECONVERT. When I started
> calling the routine is when the fun started. The first iteration of my test
> program worked fine (see below). But when I added an ACCEPT statement to
> the program I got the following error:
> RUN NEWTESTX;LIB=G
> Enter Date (YYMMDD):
> 980101
>
> **** INTERNAL TRAP
> Data Memory Protection Trap
> [VSM] Invalid Address Alignment


The "status" parameter to HPDATECONVERT is (OMHO) incorrectly
defined as 4-byte aligned ... CM COBOL appears to have a 50/50
chance of putting  your variable at an even DB address (and thus
a 4-byte aligned virtual address).

I'd report a bug in HPDATECONVERT...all intrinsics that take status
parameters should only require 2-byte alignment!

Ugly workaround:
declare a 4-byte status, a 2-byte slop, a 4-byte status, and using
the COBOL "loc" (???) construct, choose the one at run-time that has
an even DB address (assuming we're dealing with halfword addresses,
and not byte addresses).


SS

ATOM RSS1 RSS2