Post Reply 
MCODE programming: help needed with asmnut 0.40.1
01-26-2021, 03:55 PM
Post: #2
RE: MCODE programming: help needed with asmnut 0.40.1
OK, I think I sort of fixed the PROMPT function, by simply mapping all the mainframe supported prompt variants. In prompt.c, I set:

Code:

s_prompt_map prompt_map[ 16 ] = {
  { 0x00, 0x0001, '0', "None",                                           },
  { 0x01, 0x0002, '1', "Alpha (null input valid)",                       },
  { 0x02, 0x0004, '2', "2 Digits, ST, IND, IND ST, +, -, * or /",        },
  { 0x03, 0x0008, '3', "2 Digits or non-null Alpha",                     },
  { 0x11, 0x0010, '4', "3 Digits",                                       },
  { 0x12, 0x0020, '5', "2 Digits, ST, IND or IND ST",                    },
  { 0x13, 0x0040, '6', "2 Digits, IND, IND ST or non-null Alpha",        },
  { 0x21, 0x0080, '7', "non-null Alpha",                                 },
  { 0x22, 0x0100, '8', "2 Digits, IND or IND ST",                        },
  { 0x23, 0x0200, '9', "2 digits or non-null Alpha",                     },
  { 0x31, 0x0400, 'A', "1 Digit, IND or IND ST",                         },
  { 0x32, 0x0800, 'B', "2 Digits, IND or IND ST",                        },
  { 0x33, 0x1000, 'C', "2 Digits, IND, IND ST, non-null Alpha . or ..",  },
};

and in the for loops in make_prompt(), I limited i to 13 for the 13 entries. The mask is now no longer needed so one might to throw this out too.

@Christophe, you will probably have had something in mind with the way you set this up but it did not work for me, and I could not understand what you were trying to achieve. At the end of the day, as I understand the mainframe function, it supports only the 12 combinations pointed to by the bits in the left column.

Now if there is a git repo somewhere ...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: MCODE programming: help needed with asmnut 0.40.1 - hmilz - 01-26-2021 03:55 PM



User(s) browsing this thread: 2 Guest(s)