Assembly Forum>

#31716 50 Wed Mar 17 18:45:53 1993 SFA:The Offline Reader
...compressed...
#167368 50 Sat Sep 24 13:39:23 1994 [-*] Slayer [*-] @ MixEd ReaLity, MerpVille
But the 80386/48ûdo allow flat addressing. 4 GB ûof it. You just have to give the USE32ûdirective. If you use DOS, you'll have to use an extender, cause DOS don't like anything ûbigger than 64kThe protected mode on the û386/486 is basically a flatû space. Technically, there are no segments, but you ûcan use segments in your assembler, they just don't make t past the linker.
#167759 50 Wed Sep 28 18:47:07 1994 [i'm] Ian [cute] @ Amber, Bellevue, US/WA/KING
Slayer, are you smoking crack, or did you just not read eugene's message? Take a look at Microsoft Windows 3.0 or later running in 386 Enhanced mode. What you will find is that the computer is running in protected mode on an 80386, but with segments. And, trust me, writing protected mode programs is a little bit more involved than just setting USE32 in your assembler.
#167758 50 Thu Sep 29 15:15:39 1994 [03b*****] Lord Vader [03b*****] @ The Dream Realm, State of Looserville, US
Can someone help me? I'm trying to recompile Future Crew's demo "Mental Surgery" that comes with the Scream Tracker addition or something kit, and when I do what the batch file says (it goes into Link, which i don't have, and don't KNOW what it is) it says it's adding the file intothe other file. It said to compile the main, and include the other ASM files... Can someone help me here? I'm using TASM version 3.0 if it's needed...
#168867 50 Sat Oct 1 10:12:27 1994 StraitJacket @ The Asylum, Seattle, U.S.A.
Linking is a fital part of any compilation process...
#168375 50 Sun Oct 2 01:58:24 1994 darth puppy @ Lost Archives, Custer, USA/WA/WHATCOM
whats wrong with smokng crack anyway
#168868 50 Sun Oct 2 02:01:41 1994 John @ Saltlick Of Desire, Seattle, USA/WA/KING
Linking isn't any part of the compilation process. Linking is part of the linking process.
#168869 50 Sun Oct 2 08:51:43 1994 JayDee @ Loka, sea
and I have no idea what the fital process is someone gimme a clue...
#168872 50 Sun Oct 2 09:38:09 1994 StraitJacket @ The Asylum, Seattle, U.S.A.
Phtt.. Ok... linking is a vital part of the Source -> executable process...
#168870 50 Sun Oct 2 16:44:21 1994 [i'm] Ian [cute] @ Amber, Bellevue, US/WA/KING
Lord Vader: The linker that comes with Borland's TASM is named TLINK.EXE. What it looks like is happening is you have several .ASM files, all of which get assembled separately by TASM. After everything is assembled, you link all of the resulting object (*.OBJ) files with TLINK to make a finished product.
#168873 50 Sun Oct 2 22:11:15 1994 JayDee @ Loka, sea
Phtting isn't going to help, SJ they will tear you to bits...
#168871 50 Mon Oct 3 16:06:32 1994 [03b*****] Lord Vader [03b*****] @ The Dream Realm, State of Looserville, US
No, the docs say that only MAIN.ASM get's compiled, and the others (yes, there are several .ASM files) get included into it... Hmm... I'll have to look again...
#169366 50 Tue Oct 4 08:41:57 1994 StraitJacket @ The Asylum, Seattle, U.S.A.
I just don't care.
#170316 50 Fri Oct 7 22:27:29 1994 [i'm] Ian [cute] @ Amber, Bellevue, US/WA/KING
Lord Vader: While perfectly legal, it is quite nonstandard to include all of the other .ASM files into MAIN.ASM. Check MAIN.ASM for lines that say something like "include poop.asm" (I forgot the exact syntax). If there are none, then they all get compiled separately. If the lines are there, then you only have to assembly MAIN.ASM, of course. Either way, you have to use your linker (TLINK) to make an executable program out of the output of TASM. TLINK main (then any other files you assembled separately, if you did assemble any others separately)
#171781 50 Thu Oct 13 04:11:21 1994 John @ Saltlick Of Desire, Seattle, USA/WA/KING
You'll need an assembler like MASM or TASM. You'll also need to create a .H file identifying which assembly functions you intend to call from your C code. You probably need to tackle calling conventions, but I'm hazy on the details here. Finally, you need to tell your linker about the OBJ of the assembly code created by MASM or TASM. It will resolve calls in the C code to these asm functions. That's the rough outline. We can go from there.
#172171 50 Sat Oct 15 11:42:47 1994 [i'm] Ian [cute] @ Amber, Bellevue, US/WA/KING
The calling conventions part of it might be a big problem if your assembly function was not created to be called by C. You might need to build a small assembly function that translates the C calling convention to whatever it is your desired assembly function uses, and call this other function. the c calling convention is basically: push all parameters on the stack, from right to left. call the function (which pushes the return value onto the stack). the caller is responsible for cleaning up the stack (that is, taking all parameters off of it). with most c compilers you can specify the pascal calling convention: push all parameters on the stack, from left to right. call the function (which pushes the return value onto the stack). the called function is responsible for cleaning up the stack. If the assembly function does not take any parameters, then it is compatible with both of these conventions. another problem you might run into if your assembly function was not written to be called from c is that is might change some registers that the calling function assumes will not change. these registers (di, si, probably ds depending on the memory model) are used for register variables. basically, as with most programming things, there are many possible cases involved, which is why this topic in a book would take several pages. Perhaps it would be better if you had a specific example in mind, so we don't have to duplicate those several pages, which would be no more helpful for you than if you just read them yourself.
#172870 50 Sat Oct 15 15:21:44 1994 Aries Baggins @ MixEd ReaLity, MerpVille
I'm knowledgeable up to that point, John... it's more detailed stuff that confuses me. How would I reference a block of asm commands compiled into the .obj file with my C code?
#172871 50 Sat Oct 15 17:40:22 1994 [-*] Slayer [*-] @ MixEd ReaLity, MerpVille
By the name of the PROC. In older versions of MSC, you have to stick a "_" in front of the procedure name.
#172426 50 Sat Oct 15 22:20:15 1994 darth puppy @ Lost Archives, Custer, USA/WA/WHATCOM
Like this, aris baggies, .model large, c my_proc PROC ARG X:WORD Y:BYTE push bp mov bp, sp mov AX, 5 pop bp ret my_proc ENDP END like that will work so goodo, remeber to push bp and pop bp and also mov bp, sp or else you will die. If you are using masm, maybe you cant do that and you have to eat arguments anothe rway that I dont remember cause I stopped doing it on account of I have tasm, ha /* stupid.H */ int my_proc(int x, char y); //a procedure that returns five, //this is handy in case you forget //what five is.
#172872 50 Sun Oct 16 14:41:07 1994 Aries Baggins @ MixEd ReaLity, MerpVille
Okay, I'll be really specific about what I'm trying to do... but it'll require a little download. Go to the Graphics room in the Files hallway of Mixed Reality. There you'll find a file called JCLPLASM.ARJ. Download it. Within it is the assembly source for a very nice plasma routine, along with a C program that generates a file required for the plasma routine. I'm working on a compilation of graphics displays, both my own work and the work of other people, all in one EXE file. What I'd like to do is make the asm source, called jclplasm.asm, accessible through C code (in TurboC) so that they can be linked. Thanks for your help...
#172873 50 Sun Oct 16 19:37:49 1994 Lab Rat @ The Laboratory, sea
Also Aries > what do you mean by, "how to access the entirety of an assembly file with a C command"?
#174583 50 Tue Oct 18 11:08:06 1994 Aries Baggins @ MixEd ReaLity, MerpVille
What I mean by that is that I don't need to access individual blocks of code within the ASM program... I just want one function [plasma() or something like that] to access all of the assembly code. Then I just want to compile and link the two to get an operable program.
#175273 50 Wed Oct 19 12:19:51 1994 [-*] Slayer [*-] @ MixEd ReaLity, MerpVille
Thanks for the prog. I always forget what five is :) MASM and TASM also have high level procedure calling shit if you put that .model c in your code. I forget how to do it since I usually either write in straight assembly or use the in-line assembly for TP.
#175272 50 Wed Oct 19 15:30:07 1994 golden spud [viewable problem user] @ Golden Spud's Greasehouse, Custer, USA/WA/WHATCOM
Especially when there is no such thing as a C command :)
#174584 50 Fri Oct 21 00:24:07 1994 Ren @ The Institute, Sacramento, US/CA/SACRAMENTO
ARGH@!!! I'm taking an assembly class at college and it SUCKS!!
#175274 50 Fri Oct 21 17:44:53 1994 Lab Rat @ The Laboratory, sea
Aries > Thanks. It is much clearer. I think the best thing you could do is pitch all the code into asm_main(...) and call that from the C code (usually there's plenty of helpfiles documenting how to do such a thing...) or, alternatively (although there are many programmers who would smack me for saying such a thing) inline the assembly directly into your C file. but then this is what everyone's been saying all along.
#176330 50 Fri Oct 21 18:32:52 1994 [i'm] Ian [cute] @ Amber, Bellevue, US/WA/KING
Aries Baggins: It is very unlikely that I will download that file from MixEd ReaLity, as I don't know the phone number (and probably wouldn't do it anyway -- at 2400 baud, a download of any significant amount of source could be expensive. how big is it?).
#175275 50 Fri Oct 21 21:41:40 1994 golden spud [viewable problem user] @ Golden Spud's Greasehouse, Custer, USA/WA/WHATCOM
Ren> what platform?
#176606 50 Sun Oct 23 19:12:23 1994 Aries Baggins @ MixEd ReaLity, MerpVille
Well, Ian, it's about... 100K, or thereabouts. And the number is (214)298-2838. Anyway, I've pretty much got all the info I need anyway.
#176329 50 Mon Oct 24 23:46:11 1994 darth puppy @ Lost Archives, Custer, USA/WA/WHATCOM
aries what you say doesnt make any sense. Did you know there is a store in lynen named aries? I bet you didnt.
Assembly Forum> _