Spitting out messages with formatted values was always a hassle for me in assembler. So years ago I wrote some code to somewhat mimic printf, and never looked back. Invoked by macros something like this:

 #PRINTF SYSPRINT,'THIS IS LINE %D OF %D',VAR1,VAR2
 #PRINTF SYSPRINT,'THIS IS STRING %S HERE',STR1
 #PRINTF SYSPRINT,'DATA IS %08X',POINTER

On 9/20/2022 12:23 AM, Colin Paice wrote:
For me, the challenge with learning assembler is how do you input and
output.  I would have an assembler program called from a C program - and
teach them how to use the C "printf" function from assembler  to output
data.  The class can then focus on the assembler code, and get it working.

I learned the hard way, using the CMS PRY debugging tool to step through
the code, and look at the effect of the instructions.

Colin

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to