Mark, I don't understand the question.
You have already shown the resulting disassembled code for that C.
Are you asking about how to get the disassembled code for the C library routine?
Ah! Read through the thing again, and it seems you are indeed looking for the disassembly
of the library routines.
Well, I guess you want a disassembler for that. Check if there aren't any in the DECUS
library perhaps?
By the way. There is no guarantee that DECC$STRCPY is written in C. But a disassembly will
only give you VAX assembler anyway.
Johnny
On 2011-03-13 21:58, Mark Wickens wrote:
Guys,
Purely out of interest, how would I diassemble a DEC C routine on
VAX/VMS? Can I use DEBUG to do this?
For example, I have the following code:
#include <stdio.h>
#include <string.h>
void main(int argc, char **argv) {
char to[32];
strcpy(to, "Hello World!\n");
printf(to);
}
If I use
BUBBLE$ cc/list/machine_code strcpy.c
I get the following:
1 1267 strcpy(to, "Hello World!\n");
D6 AF 9F 0027 pushab $CODE
D8 AD 9F 002A pushab -40(fp)
00000000* EF 02 FB 002D calls #2,DECC$STRCPY
Note that the call to DECC$STRCPY is listed, but not the code in the
routine.
I'm interested in how some of the C library routines are implemented at
a machine code level from an academic point of view.
Regards, Mark.
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic
trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" -
B. Idol
Show replies by date