¿ªÔÆÌåÓý

Re: TXTLIB and Stack Question


 

¿ªÔÆÌåÓý

Hi Adrian,

OK, I've had enough coffee and am awake now.? LOL

Yes, the MVI & MVC combination is pretty much the norm for clearing/initializing memory.? I've seen other ways, but I'll not cloud the issue.? Clearing/initializing that field is a good idea.

With C, the argc/argv combination gives you the actual value(s) from the command line.? In IBM assembler the PLIST gives you the address of the location of each of the 8 byte values.?

An example in the program is on line 55.? In the comment area "RESLIB LIST GCCLIB ( NOTYPE" would be typed on the command line.? Line 290-295 shows how it will appear after being parsed.? The PLIST will contain the address of each portion of the command line plus and 8 byte "fence"/termination field of all x'FF' (high values).

Eight (8) is the magic number because Command names, file names, file types and the like in CMS are all 8 characters or less.

The 257 byte length of the ARGVARGS field will indeed hold 32 arguments (8x32=256) plus 1 byte for a fence/termination character.

Gary


On 2/25/20 6:57 AM, adriansutherland67 wrote:

OK - So I understand the issue now with PLIST, basically I would need to add
MVI? ?0(R3),C' '
after line 253. This makes sure that the proper end of the token is found even is some preexisting junk is there in the target ARGVARGS.

But I have no chance of seeing if the same problem exists in EPLIST let alone fixing it (for a start I could not test it!).

Therefore the safest thing to do is instead clear this
ARGVARGS DS CL257
down to zeros (or spaces?) first. The trouble is my S/370 is crap (nonexistent!), is this the most efficient/elegant way?

MVI? ARGVARGS,X'0'? ? ? ? ? ? ? ? ?* Zero start
MVC? ARGVARGS+1(256),ARGVARGS? ? ? * Propagate to the rest?
Anyway I will see it it works!


Join [email protected] to automatically receive all group messages.