Question

Locked

combining C and Assembly code..

By letsameliorate ·
Hi..

I am working on the MVS platform.. Coding in C and z/OS assembly code through the Unix System Services.. I have one C file (macrocaller.c) and one assembly file (macro1.s)..

I have problem in the assembly code whenever i use the Move instructions (like MVC, MVI, CVD, etc.).. I get the following error message on the USS..

********************************
b4 calling MYCALL()
CEE3204S The system detected a protection exception (System Completion Code=0C4).
From entry point MYCALL at compile unit offset +00000078 at entry offset +00000078 at address 23F7B108.
[1] + Done(139) ./a.out
83887149 Segmentation violation ./a.out
********************************


and my program codes are:

"macrocaller.c":
----------------
#include <stdio.h>
#pragma linkage(MYCALL,OS)
void main()
{
printf("\n b4 calling MYCALL()\n");
MYCALL();
printf("\n after calling MYCALL()\n");
return;
}


"macro1.s"
----------
R3 EQU 3
R4 EQU 4
R5 EQU 5
R6 EQU 6
MYCALL CSECT
MYCALL AMODE 31
MYCALL RMODE ANY
EDCPRLG
LA R4,VAR1
LA R5,VAR2
MVC 0(8,R4),0(R5)
EDCEPIL
LTORG
VAR1 DS CL8
VAR2 DC CL8'Kannan'
NULL EQU X'00'
END


could any one please give me any ideas where I might have the problem?!?

Looking forward.. thanks very much in advance..
- Venkatesh..

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Windows Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums