On 05.03.2011 5:12, Sampsa Laine wrote:
Again available at http://rhesus.sampsa.com/hecnetdir.html
Let me know if you want nodes added to the directory.
Sampsa
Hi!
Please add CTAKAH.
On Mar 13, 2011, at 8:21 PM, Peter Coghlan wrote:
Purely out of interest, how would I diassemble a DEC C routine on
VAX/VMS? Can I use DEBUG to do this?
Yes, you can use DEBUG for this.
Better still, use the public domain DISM32 by Andrew Pavlin. I can't remember
where I got it but even if it is not on the freeware cds, it should not be too
difficult to locate it. If not, I can provide a copy. If you don't get a
compiled version, you need a FORTRAN compiler to build it.
Something else that might work: the GNU tools may either be able to process VMS format files, or be talked into converting it to something they can handle. If so, you could use objdump or gdb to look at the bits in question.
paul
Purely out of interest, how would I diassemble a DEC C routine on
VAX/VMS? Can I use DEBUG to do this?
Yes, you can use DEBUG for this.
Better still, use the public domain DISM32 by Andrew Pavlin. I can't remember
where I got it but even if it is not on the freeware cds, it should not be too
difficult to locate it. If not, I can provide a copy. If you don't get a
compiled version, you need a FORTRAN compiler to build it.
DISM32 takes a VAX executable/sharable/system image and generates assembler
source which can be run back through the MACRO assembler. Some tweaking may be
required before it will assemble properly. More tweaking may be required to
correctly differentiate between code and data in all cases, although it does
a pretty good job in general. It is especially good with device drivers and
knows how to regenerate many/most of the macros used to assemble them. It is
also very good with ordinary user mode code. It can get confused by code
sections that never get called and by some calculated addresses but it is
possible to give it hints about these and run it iteratively to achieve an
acceptable result.
You can use DISM32 on SYS$LIBRARY:DECC$SHR.EXE or an executable image linked
with SYS$LIBRARY:DECC$CRTL.OLB to disassemble bits of the C runtime library.
Unfortunately, some of the constructs uses by C compilers can look pretty
obscure when viewed as assembly language. If bits of the runtime library
are originally written in assembly, they will likely be easier to figure out.
Regards,
Peter Coghlan.
Purely out of interest, how would I diassemble a DEC C routine on
VAX/VMS? Can I use DEBUG to do this?
Yes, you can use DEBUG for this.
If I remembered how to use the VMS debugger better, I'd give you more detailed information, but what you can do is set a breakpoint at the strcpy(), and then STEP/INTO to go into DECC$STRCPY. Since there's no source for it, DEBUG will show you the VAX instructions.
Let me see what I can do. Warning: I'm very, very rusty! :-)
Okay, I compiled and linked the program /DEBUG.
Then, I ran the program and stepped to the strcpy() line.
I used "SET MODE SCREEN" to enable full-screen debugging and then "DISP INST AT RH1" to put the VAX instructions on the screen next to the source.
Using "SET STEP INST" will step by instructions instead of source lines. You can then use "STEP/INTO" to step into the RTL and see the instructions as you step through it.
Without symbols in DECC$SHR, you're probably not going to get much out of it, but at least you can see what's there.
--Marc
Once you have the object extracted from its library you can execute:
$ ANALYZE/OBJECT <filespec>
Section #2 "LANGUAGE PROCESSOR HEADER" should give you the source
language(s) used.
-Steve
-----Original Message-----
From: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE] On
Behalf Of Johnny Billquist
Sent: Sunday, March 13, 2011 19:02
To: hecnet at Update.UU.SE
Subject: Re: [HECnet] Disassembling DEC C routines
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
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
Mark, IIRC VAX compilers have an option that lists the assemblycode. It's either an option for /LIST or /OUTPUT.
For C the included libraries may be omitted, again a switch for the CC command
Hans
------Origineel bericht------
Van:Mark Wickens
Afzender:owner-hecnet at Update.UU.SE
Aan: hecnet at Update.UU.SE
Aan: msw at hecnet.eu
Beantwoorden:hecnet at Update.UU.SE
Onderwerp: [HECnet] Disassembling DEC C routines
Verzonden: 13 maart 2011 21:58
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.
Verzonden vanaf mijn draadloze BlackBerry -toestel
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.
Phone V1 on VMS was a hack from the VMS MAIL utility by Paul
Agnostopolis (sp?).
Trivia question time... What other X1/T1/V1 VMS Layered Product came
from VMS MAIL?
-Steve
-----Original Message-----
From: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE] On
Behalf Of Paul Koning
Sent: Saturday, March 12, 2011 17:52
To: hecnet at Update.UU.SE
Subject: Re: [HECnet] Network status
It may have been the other way around. There were a number of DECnet
applications that started on VMS; Notes is one such. I don't remember
Phone anywhere other than VMS -- so I can't be sure about the time line
for that one.
paul
On Mar 12, 2011, at 2:15 AM, <hvlems at zonnet.nl> wrote:
Phone is available on RSX-11. So it is safe to assume that the VMS
version got ported from RSX-11. Which dates Phone somewhere in the mid
70's, right?
Coming from punched cards and papertape anything on a screen seems
modern :-) Hans ------Origineel bericht------ Van:Bob Armstrong
Afzender:owner-hecnet at Update.UU.SE
Aan: hecnet at Update.UU.SE
Beantwoorden:hecnet at Update.UU.SE
Onderwerp: RE: [HECnet] Network status
Verzonden: 11 maart 2011 17:23
Want any hosts added to the phone directory?
No, I actually prefer email. I'm not really into the this whole
chat/texting/instant messaging/tweeting thing. Guess I'm just old
fashioned.
But then I wouldn't be here on this list if I wasn't :-)
Bob
Verzonden vanaf mijn draadloze BlackBerry(r)-toestel
It may have been the other way around. There were a number of DECnet applications that started on VMS; Notes is one such. I don't remember Phone anywhere other than VMS -- so I can't be sure about the time line for that one.
paul
On Mar 12, 2011, at 2:15 AM, <hvlems at zonnet.nl> wrote:
Phone is available on RSX-11. So it is safe to assume that the VMS version got ported from RSX-11. Which dates Phone somewhere in the mid 70's, right?
Coming from punched cards and papertape anything on a screen seems modern :-)
Hans
------Origineel bericht------
Van:Bob Armstrong
Afzender:owner-hecnet at Update.UU.SE
Aan: hecnet at Update.UU.SE
Beantwoorden:hecnet at Update.UU.SE
Onderwerp: RE: [HECnet] Network status
Verzonden: 11 maart 2011 17:23
Want any hosts added to the phone directory?
No, I actually prefer email. I'm not really into the this whole
chat/texting/instant messaging/tweeting thing. Guess I'm just old
fashioned.
But then I wouldn't be here on this list if I wasn't :-)
Bob
Verzonden vanaf mijn draadloze BlackBerry -toestel