outputting a character on the console from within hlasm (370)

Viewed 325

For fun I'm implementing brainfuck compilers translating bf to e.g. x86 assembly. Currently I'm working on bf to mainframe assembly. Dialect is "HLASM" and mainframe is one of IBM with a 370.

Sofar most of it works only emitting a character to the console of the operator fails: I only get spaces and it looks like an implicit linefeed is added (which I don't want).

Can anyone find my mistake?

* get a character to display
         LLGC  R6,0(R7)
* get a pointer to the buffer which will contain the char to displa
         LA    R5,BUFFER
* store character in buffer
         STC   R6,0(R5)
* get a pointer to the memory area describing the data to display
         LA    R1,MSGAREA
* invoke display char
         SVC   35

MSGAREA  EQU   *
         DC    AL2(5)
         DC    XL2'00'
BUFFER   DC    C'!'
1 Answers
Related