HDTenEightyP/NetNews huggingface dataset:
From: JWILKINSON@HMCVAX.CLAREMONT.EDU (James Wilkinson)
Newsgroups: vmsnet.internals
Subject: I/O to terminal server ports.
Date: 24 Jul 92 08:22:00 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

I have encountered several programs lately which rely on certain terminal port
behavior which is not emulated by terminal server ports.  When doing single
QIOs to a server port, for instance, the request will not complete as long as a
printer is not hooked up to the port (DS90L+).  With a normal terminal device,
the request completes right away and the I/O packet goes to the bit bucket.
Additionally, with a normal terminal device one has access to curent flow
control information available in the device UCB, whereas such information is
unavailable from LTDRIVER.

I have in front of me a program which was designed around the ability to
determine whether a QIO would complete in a timely fashion before the QIO was
actually issued.  For instance, if the printer were offline or out of paper,
the device would be in an XOFFd state and no QIO issued.  If the printer were
not connected, the QIO would still complete.  Naturally, this code is a shoe-in
for RWAST when the printer is an LT device.

Does anyone have any idea how to obtain similar functionality for the LT
device?  I'm looking for some way to query the terminal server about the port's
readiness, such that if I go ahead and issue the QIO I know that it will
complete soon thereafter.  The program shouldn't have been coded in such a
fashion in the first place, however changing over to a multi-threaded
asynchronous mechanism will require a change in the entire design.  The program
drives multiple printers.

JaW
jwilkinson@hmcvax.claremont.edu

ps. I suspect that LTDRIVER must keep flow control information somewhere,
otherwise servers wouldn't work.  However, the scenario with the printer
disconnected is the real problem.
From: DWING@UH01.Colorado.EDU (Dan Wing)
Newsgroups: vmsnet.internals
Subject: Re: Need: Captive USR Pwd Procedure
Date: 23 Jul 92 19:18:47 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

Tom, vaughan@sjh.ORG, writes:

>Has anyone seen a *good* command procedure or program that can be run in a
>captive environment to let the user set their password?   Security is the
>first and last concern, but I don't want them out to DCL (hence VMS wacks
>off their heads) because they will leave other things undone and data gets
>messed up, or better yet the software won't let them back in.

I can't say this is "good", but its what we use...  It allows the user a
few attempts to try to change it, and tells the user when they actually
changed it (something I wish SET PASSWORD did by itself).

-Dan Wing, DWING@UH01.Colorado.EDU or WING_D@UCOLMCC.BITNET (DGW11)
 Systems Programmer, University Hospital, Denver

-----

$  WRITE SYS$OUTPUT ""
$  WRITE SYS$OUTPUT "You are about to change your VMS password -- this is the
password"
$  WRITE SYS$OUTPUT "you enter after typing your username (", -
     F$GETJPI(0,"USERNAME"), ")."
$  WRITE SYS$OUTPUT ""
$  COUNT = 1
$_CHOICE_2_LOOP:
$
$  WRITE SYS$OUTPUT ""
$  DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
$  SET noON
$  SET PASSWORD
$  STATUS = $STATUS
$  SET ON
$
$  IF STATUS
$  THEN
$    WRITE SYS$OUTPUT "Your password has been changed."
$  ELSE
$    IF STATUS .NE. %X107780E4     ! locked password
$    THEN
$      COUNT = COUNT + 1
$      IF COUNT .EQ. 3 THEN WRITE SYS$OUTPUT "You have one more attempt"
$      IF COUNT .LE. 4 THEN GOTO _CHOICE_2_LOOP
$      WRITE SYS$OUTPUT "You exceeded the password-change retry limit"
$    ENDIF
$  ENDIF
$
From: gjc@mitech.com (George J. Carrette)
Newsgroups: vmsnet.internals
Subject: Re: RE: VMS Memory Management/PGFLQUOTA question
Date: 27 Jul 92 09:54:10 GMT
Organization: Mitech Corporation, Concord MA

In article <1992Jul24.081332.1@zodiac.rutgers.edu>, leichter@zodiac.rutgers.edu writes:
> If you want a process to have
> "a quarter of a gigabyte or so" of VM, you'll have to VIRTUALPAGECNT that
> high.  That's probably beyond the supported value, and will certainly cause
> quite a hit on your system, as it will cause the size of all the balance sets
> to grow to cover it.  I hope you have a LOT of real memory.

Ah, we show our age here. Don't forget that VIRTUALPAGECNT has to be
high enough to support $ANAL/SYSTEM and map all of physical memory.

Even VMS 5.4 SYSGEN supports a VIRTUALPAGECNT of 1000000 Pages,
enough to cover the high-end VAX 9000 model, presumably.
From: MILLER@TGV.COM
Newsgroups: vmsnet.internals
Subject: Re: How can I determine if running under debugger?
Date: 29 Jul 92 02:41:37 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List


>The debugger modifies certain entries in the system service dispatch table.
>The slot for sys$exit is changed from something like

[...]

Ahem.  The debugger is not the only application that modifies the System
Service.

I wrote a system service monitor that replaces the system services.
Maybe you could check for that lock that the debugger uses...

-bruce
From: leichter@zodiac.rutgers.edu
Newsgroups: vmsnet.internals
Subject: RE: VMS Memory Management/PGFLQUOTA question
Date: 24 Jul 92 12:13:32 GMT
Organization: Rutgers University Computing Services

In article <1992Jul23.153406.1@amherst.edu>, jwmanly@amherst.edu writes:
||| address space for my exclusive use in an image.  We're talking a quarter of a
||| gigabyte or so here.
| 
|| Why is it desired to greate a quarter-Gbyte address space that is reserved
|| against use by system routines, but not associated with backing store? The
|| only thing I can think of is come sort of very sparsely populated matrix,
|| but there are better ways to code these as linked lists...
| 
| You are basically correct.  It's not actually a matrix but it is a large
| yet extremely sparse data structure.  If you like, though, you can think
| of it as a huge matrix.  HOWEVER, I don't have control over how the matrix
| cells are accessed.  Think of me as a lowly library routine responsible only
| for creating this monstrosity.
| 
| The matrix has to look to the user as if it really is all there, but my  code
| fields the access violations on non-existent pages (using a condition handler
| in the secondary vector or something), do a $CRETVA on the pages as they are
| accessed, and continue.

Well, the first thing to realize is that you can't really do what you want:
The VAX architecture doesn't support sparse page tables.  A page table always
runs contiguously from page 0 up to some page.  If you want a process to have
"a quarter of a gigabyte or so" of VM, you'll have to VIRTUALPAGECNT that
high.  That's probably beyond the supported value, and will certainly cause
quite a hit on your system, as it will cause the size of all the balance sets
to grow to cover it.  I hope you have a LOT of real memory.

Now, given that you accept this limitation, you have to look at just what you
are trying to accomplish.  You want a region of addresses (which don't yet
correspond to memory) from START to END which you know no one else will
ever use.  The only way such memory might be used is if someone allocated it,
either useing LIB$GET_VM or one of the VMS memory system services.  The
former is easy to deal with:  If LIB$GET_VM needs more memory, it always
allocates it at the end of P0, use $EXPREG.  Direct calls to $EXPREG, of
course, also allocate at the end of P0, as do most other things that allocated
VM.  (The only thing that DOESN'T is $CRETVA.  You can do absolutely nothing
about that.)

So, we simply have to ensure that we've put END at the end of P0.  This is
easy:

	Use $EXPREG to allocate one page.  Its beginning address is START.
	Calculate END from START.
	Use $CRETVA to allocate the single page containing START.  The
		addresses between START and END will not be usable by
		LIB$GET_VM, $EXPREG, and such, and will not correspond to
		any real memory or backing store until you use $CRETVA to
		allocate them.

Expect poor performance.  Neither the VAX architecture nor VMS are designed
for this kind of application.
							-- Jerry
From: brydon@dsny25.sinet.slb.com
Newsgroups: vmsnet.internals
Subject: RE: Need: Captive USR Pwd Procedure
Date: 23 Jul 92 19:32:33 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

Tom Vaughan (vaughan@sjh.ORG) asks:
>Has anyone seen a *good* command procedure or program that can be run in a
>captive environment to let the user set their password?   Security is the
>first and last concern, but I don't want them out to DCL (hence VMS wacks
>off their heads) because they will leave other things undone and data gets
>messed up, or better yet the software won't let them back in.

How about:

$ define /user sys$input sys$command
$ set password
$ exit

_______________________________________________________________
Harvey Brydon         | Internet:   brydon@dsn.SINet.slb.com
Dowell Schlumberger   | P.O.T.S.:   (918)250-4312
           Never moon a werewolf.
Newsgroups: vmsnet.internals
From: bandy@aplcen.apl.jhu.edu (Bandy michael carl 792-6000x3351)
Subject: Re: Why does emptying a dir take so long?
Keywords: ACP_DIRCACHE
Organization: Johns Hopkins University
Date: Wed, 29 Jul 92 03:48:38 GMT

Maarten Landzaat writes :
>He has a few directories containing a few hundred files. Sometimes, these
>dirs need to be emptied. He then issues a simple delete *.*;* or whatever.
>then VMS takes an INCREDIBLE time of 2 hours (5.4) or 45 minutes (5.5) 
>to delete the files.
<stuff deleted>

A directory is maintained as a contigous, alphabetical list of the filenames
contained within it.  When you delete *.*;* it removes all files from the 1st
block of the directory then scoots all remaining blocks down over the 1st.
This continues till the complete list is deleted.

You can see that the blocks are not completely filled but use a block splitting
algorithm like RMS indexed files by doing a DUMP on the .DIR file itself.
Depending on the order in which the files were added, the blocks may be less
than 30% used, especially if they have long names.

You can speed up a delete if you know that the files are named with a few 
starting letters, say X, Y and Z by doing multiple deletes like:
   DELETE Z*.*;*
   DELETE Y*.*;*
   DELETE X*.*;*.    And so on.

Hope this helps.

			Mike Bandy
Newsgroups: vmsnet.internals
From: bnebga@ciba-geigy.ch (Gary Nebbett)
Subject: Re: How can I determine if running under debugger?
Reply-To: bnebga@ciba-geigy.ch (Gary Nebbett)
Organization: Ciba-Geigy AG, Basel, Switzerland
Date: Mon, 27 Jul 1992 13:36:19 GMT

The debugger modifies certain entries in the system service dispatch table. 
The slot for sys$exit is changed from something like

	chmk	#0038
	ret

to

	jmp	@#share$dbgssishr+0b68

The value of the opcode (chmk(0xbc) = nodebugger, jmp(0x17) = debugger)
provides the information you need. The P1 copy of sys$exit dispatch table 
entry is located at 0x7ffedf40 (the opcode appears at 0x7ffedf42).

The following short program run with and without the debugger demonstrates
the behaviour:

main()
{
        int *x = 0x7ffedf40;

        printf("%0x %0x\n", x[0], x[1]);
}

Regards,
Gary Nebbett


Newsgroups: vmsnet.internals
From: jnelson@gauche.zko.dec.com (Jeff E. Nelson)
Newsgroups: vmsnet.internals
Subject: Re: How can I determine if running under debugger?
Date: 27 Jul 92 21:17:43 GMT
Reply-To: jnelson@gauche.zko.dec.com (Jeff E. Nelson)
Organization: Digital Equipment Corporation


In article <1992Jul27.133619.28409@nntphost.ciba-geigy.ch>,
bnebga@ciba-geigy.ch (Gary Nebbett) writes:
|>The debugger modifies certain entries in the system service dispatch
|>table. 

Not always, and we aren't the only ones to do this. This is really not a
dependable way to figure out if the debugger is active. Jeff Diewald's
suggestion of walking the image list to look for an image named "DEBUG"
is the best option I can think of.

Of course, you'll have to decide how close you want to monitor this
information: just because the debugger isn't active when the program checks
doesn't mean that it can't be activated later: the user can type CTRL/Y
DEBUG at any time.

-Jeff Nelson
-DEBUG developer
-Digital Equipment Corporation
-Internet: jnelson@gauche.zko.dec.com
From: karcher@jevex.waisman.wisc.edu
Newsgroups: vmsnet.internals
Subject: RE: Obtaining Decnet line counters from HLL
Date: 23 Jul 92 17:28:59 GMT
Organization: Waisman Center, University of Wisconsin-Madison

In a previous article, I wrote:
>Does anyone have an example of obtaining the values for Decnet (ethernet) line
>counters from a HLL program? I'm particularly interested in the "system buffer
>unavailable" counter. I guess this would be a NICE/NML example I'm looking for.
>Or can they be lifted directly from structures in kernel mode without too much
>work? I suspect this is how the undocumented SDA command SHOW DECNET/DATALINK
>did it (which stopped working at VMS 5.5).

To which Ian Kitching (systimk@uk.ac.anglia-polytechnic.vaxa) responded by
sending me a modified pascal program from the 1987 Decus SIG tape that provides
a continuous display of the ethernet counters. All the counters are available
using a sensemode QIO to the ethernet driver (no black magic required). I
should have read the I/O user's guide (I just didn't expect it would be that
easy). Thanks Ian.


Carl Karcher                          Internet: KARCHER@WAISMAN.WISC.EDU
Waisman Center                        Bitnet:   KARCHER@WISCMACC
University of Wisconsin-Madison       PSTnet:   (608) 263-5896
From: GAVRON@VESTA.SUNQUEST.COM
Newsgroups: vmsnet.internals
Subject: UNEXPECTED SYSTEM SERVICE EXCEPTION (and NBC FAX NUMBER!!!)
Date: 28 Jul 92 17:11:37 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

I got an Unexpected system service exception with only 3 args, the
pc of which was HALFWAY through an instruction.  Anyone ever seen
something like this (bug$_wslenotvalid)???

E

NBC FAX NUMBER  +1-212-664-4085
NBC NY NUMBER   +1-212-664-2333
NBC LA NUMBER   +1-818-840-4444 (Phyllis)
Tell them how you like your Olympic basketball games cut off.
From: exubho@exu.ericsson.se
Newsgroups: vmsnet.internals
Subject: unsubscribe
Date: Wed, 22 Jul 92 07:04:19 -0500
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List


Please unsubscribe exubho@exu.ericsson.se
From: diewald@virrus.zko.dec.com (Jeff Diewald)
Newsgroups: vmsnet.internals
Subject: Re: How can I determine if running under debugger?
Date: 27 Jul 92 14:15:37 GMT
Reply-To: diewald@virrus.zko.dec.com (Jeff Diewald)
Organization: Digital Equipment Corporation


The easiest way to do this is to walk the image list to see if any of the
Debugger images are present.

You don't want to be looking at the $SETEXV handlers; we play some games there
that could confuse you.

If I may ask - why is this important to you?  
-------------------------------------------------------------------------------
	Jeff Diewald			EASYNET:   VIRRUS::DIEWALD
	Debug group			INTERNET:  diewald@virrus.zko.dec.com
	Digital Equipment Corp.
From: vaughan@sjh.org (Tom Vaughan)
Newsgroups: vmsnet.internals
Subject: Need: Captive USR Pwd Procedure
Date: 23 Jul 92 17:27:07 GMT
Distribution: na
Organization: St. Joseph Hospital, Cheektowaga, N.Y.

-- 
Has anyone seen a *good* command procedure or program that can be run in a
captive environment to let the user set their password?   Security is the
first and last concern, but I don't want them out to DCL (hence VMS wacks
off their heads) because they will leave other things undone and data gets
messed up, or better yet the software won't let them back in.

Thanks,

Tom

-- 
Internet: vaughan@sjh.ORG
UUCP    : ..!{ames!canisius,doh1c,sigmast,ub}!sjhvax!vaughan
SMSNET  : 40961::vaughan                
Where   : Tom Vaughan / Mgr. Comp. Ops./ St. Joseph Hospital /Cheektowaga N.Y.
--
Newsgroups: vmsnet.internals
From: gwlester@cpu.com (Gerald W. Lester)
Subject: Re: UNEXPECTED SYSTEM SERVICE EXCEPTION (and NBC FAX NUMBER!!!)
Organization: Computerized Processes Unlimited, Metairie, LA, (504)-889-2784
Date: Wed, 29 Jul 1992 14:04:46 GMT
Reply-To: gwlester@cpu.com

In article <920728101137.127@VESTA.SUNQUEST.COM>, GAVRON@VESTA.SUNQUEST.COM writes:
>Tell them how you like your Olympic basketball games cut off.

	Who cares about basketball!  Now why don't they show *ALL* of the U.S.
Womens Gymnastics and why *NO* fencing?

(What you can't hear that neat drum beat?)

GWL
From: neill_clift@hicom.lut.ac.uk
Newsgroups: vmsnet.internals
Subject: Re: CALL/RSB contest
Date: 31 Jul 92 07:50:07 GMT
Reply-To: neill_clift@hicom.lut.ac.uk
Organization: Hicom Sevices

In article <MHL5I3T@gwdu03.gwdg.de>, moeller@gwdgv1.gwdg.de writes:
>It's not that easy coming up with a reasonable entry mask -
>if you want at least <r2,r3,r4,r5>, apart from MOVZWL and CLRQ,

Have a look in LIBRTL where DEC actualy use this horid trick to do their
unsupported jsb/calls routine.
                               Neill.
From: DWING@UH01.Colorado.EDU (Dan Wing)
Newsgroups: vmsnet.internals
Subject: Re: monitor locations.
Date: 27 Jul 92 16:48:58 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

Bob George, BOB@AENEAS.IMS.DISA.MIL, writes:

>   I've been looking through the manuals, but haven't seen it yet.  Does
>anyone know the symbolic system locations that monitor uses to determine
>the time spent in each of the processor modes?   Thanks,

I've attached a portion of Nick de Smith's MONMODE.COM program, which
generates output similar to MONITOR MODES, except it breaks down the output
on a per-CPU basis (for SMP machines).  If anyone wants a copy, let me know.

-Dan Wing, DWING@UH01.Colorado.EDU or WING_D@UCOLMCC.BITNET (DGW11)
 Systems Programmer, University Hospital, Denver

-----

$!
$! From SYS$SYSTEM:SYS.MAP. As these are in the base image for VMS, they should
   be the same for all VMS V5.x systems.
$!
$       EXE$GL_ABSTIM_TICS      = %x800046F8
   ! Number of TICs since system boot
$       EXE$GQ_SYSTIME          = %x80004450
   ! System time
$       SMP$GL_FLAGS            = %x800045CC
   ! SMP flag word
$               SMP$M_ENABLED           = %x00000001
   ! SMP processing is enabled
$       SMP$GL_ACTIVE_CPUS      = %x800045A8
   ! Mask of CPUs being used by SMP
$       SMP$GL_CPU_DATA         = %x800045DC
   ! Table of pointers to per-CPU databases
$!
$! From $CPUDEF. We assume that CPU$L_NULLCPU = CPU$L_KERNEL + CPU_L_IDLE = CPU$
   L_KERNEL + CPU$S_KERNEL + 4
$!
$       CPU$B_STATE             = %xd
   ! State of this processor
$       CPU$S_KERNEL            = %x1c
   ! Size of time in modes structure
$       CPU$L_KERNEL            = %x278
   ! Time in    KERNEL mode
$               CPU_L_KERNEL    = %x00
   ! Offset to   ''    ''
$               CPU_L_EXEC      = %x04
   !   ''   ''  EXEC    ''
$               CPU_L_SUPER     = %x08
   !   ''   ''  SUPERVISOR ''
$               CPU_L_USER      = %x0c
   !   ''   ''  USER    ''
$               CPU_L_INTERRUPT = %x10
   !   ''   ''  INTERRUPT ''
$               CPU_L_COMPAT    = %x14
   !   ''   ''  Compatability ''
$               CPU_L_MPSYNCH   = %x18
   !   ''   ''  MPSYNCH ''
$               CPU_L_IDLE      = %x1c
   !   ''   ''  EXEC    ''

And a comment:

$! Read the executive per-CPU database for each active CPU.
$! Determine the state of the processor, and collect all the counters.
$! Note we have to subtract the idle ticks from the interrupt ticks, as under V5
    idle time is
$! spent on the interrupt stack. If we don't do this, idle time appears twice.
From: "Bob George" <BOB@aeneas.ims.disa.mil>
Newsgroups: vmsnet.internals
Subject: monitor locations.
Date: 27 Jul 92 12:21:00 EST
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

   I've been looking through the manuals, but haven't seen it yet.  Does
anyone know the symbolic system locations that monitor uses to determine
the time spent in each of the processor modes?   Thanks,
                                    bob

+---------------------------------------------------------------------+
|      Bob George       Internet:  BOB@AENEAS.IMS.DISA.MIL            |
|      Disclaimer:      Opinions expressed are mine and mine only.    |
+---------------------------------------------------------------------+


Xref: sparky vmsnet.internals:1116 comp.os.vms:12770
From: marby@laura.harvard.edu (Craig Marby)
Newsgroups: vmsnet.internals,comp.os.vms
Subject: How can I determine if running under debugger?
Date: 24 Jul 92 19:23:09 GMT
Followup-To: vmsnet.internals
Organization: Chemistry Dept., Harvard University

Is it possible to determine if the debugger has been invoked during
the execution of a program? Ideally I would like to know if the
program was started with the debugger, but it would also be useful to
know later on as well (ie signal SS$_DEBUG could be sent during
execution).

I know about IHD$LNKDEBUG in the image header, but that's not enough
information really as this can be circumvented by eg. RUN/NODEB. Also
this requires reading the image itself -- which may be denied
permission.

It seems to me the best way to get this information is to look at
the exception handlers using the system service $SETEXV. When the VMS
debugger has been invoked it sets the primary condition handler (so I
understand). Can I use the address of the primary condition handler to
work out if this is the debugger or Fortran's handler or C's handler
etc.? How can I work out what the address of the debuggers primary
handler is? Is it a fixed value from activation to activation?

Another possibility that crossed my mind is that there may be logical
names DBG$* which I could use as a check, but DBG$INPUT and DBG$OUTPUT
don't seem to be much help.

Thanks in advance for any ideas.
--

    __o         
  _ \<,_       Craig A. Marby    marby@layla.harvard.edu
 (_)/ (_)      
~~~~~~~~~~
From: SYSMGR@IPG.PH.KCL.AC.UK
Newsgroups: vmsnet.internals
Subject: re: UNEXPECTED SYSTEM SERVICE EXCEPTION
Date: Wed, 29 JUL 92 16:00:33 BST
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List

> I got an Unexpected system service exception with only 3 args, the
> pc of which was HALFWAY through an instruction.  Anyone ever seen
> something like this (bug$_wslenotvalid)???

Haven't seen anything like these details, but have seen PC halfway through
an instruction. It's called a phase error. What I had done was CALL a JSB
entrypoint. The first two bytes of the first instruction were a valid
save mask, so it carried on. The third byte was also a valid instruction...
Normally, things go wrong pretty fast thereafter.

Interesting irrelevance: the genetic code (DNA base sequences) has a lot
in common with a computer program. It has been observed that two genes
(programs for assembling proteins) can share a common sequence WITH A
PHASE SHIFT BETWEEN THEM. It could be fun trying to write a MACRO
equivalent : maybe a piece of code that did one sensible thing if you
JSB'ed it and a totally different sensible thing if you CALLed it!

                Nigel Arnot

                NRA%ipg.ph.kcl.ac.uk@nsfnet-relay.ac.uk   (internet)
                NRA%uk.ac.kcl.ph.ipg@ukacrl.bitnet        (bitnet)
                etc...

Newsgroups: vmsnet.internals
From: moeller@gwdgv1.gwdg.de
Subject: CALL/RSB contest
Reply-To: moeller@gwdgv1.gwdg.de
Organization: GWDG Goettingen, F.R.Germany
Date: Thu, 30 Jul 1992 19:33:40 GMT

It's not that easy coming up with a reasonable entry mask -
if you want at least <r2,r3,r4,r5>, apart from MOVZWL and CLRQ,
only the funny variant CHMK #0 exists (thrashes registers).
As a starter, here is something using MOVZWL #...

.entry	jsb_or_call,^m<dv,r2,r3,r4,r5,r8,r9,r10,r11>
	movzbl	#0,-4(sp)	;purists might prefer ",-(SP)" and "TSTL (SP)+"
;
; condition codes: "zero" after CALL, non-"zero" after JSB
; all registers unchanged
;
	beql	call_code
jsb_code:	;; code #1 goes here
	rsb
call_code:	;; code #2 goes here
	ret

Is there a solution for ^m<r2,r3,r4,r5> ?? :-{)}

Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ...
PSI%(0262)45050352008::MOELLER      Phone: +49 551 201516 | No claim intended!
Internet: moeller@gwdgv1.dnet.gwdg.de   | This space intentionally left blank.