By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,919 Members | 1,867 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,919 IT Pros & Developers. It's quick & easy.

Dealing with source code

P: n/a
How to deal with source code? What format need be source files to
compile? I have source code on
html pages, or in .txt format (this is assembler, not c, but there is
no big difference, i think). What suitable editor to edit source code?
Notepad? What format source need be saved? I need compile Nasm source
into exe, parameters is:

nasmw -s -fbin -o filename.s filename.asm

should I run Nasm from MS-DOS window or from Run box?

m.

Oct 6 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a


On Oct 6, 4:45 pm, "mistral" <polych...@softhome.netwrote:
How to deal with source code? What format need be source files to
compile? I have source code on
html pages, or in .txt format (this is assembler, not c, but there is
no big difference, i think). What suitable editor to edit source code?
Notepad? What format source need be saved? I need compile Nasm source
into exe, parameters is:

nasmw -s -fbin -o filename.s filename.asm

should I run Nasm from MS-DOS window or from Run box?

m.
It's off topic here.
It seems that you work in Microsoft Windows. You can, of course, run
that command in a MS-DOS window.
And you can edit the source code with UltraEdit.

Oct 6 '06 #2

P: n/a
mistral wrote:
What suitable editor to edit source code?
Zeus for Windows IDE: http://www.zeusedit.com

Jussi Jumppanen
Author: Zeus for Windows IDE

Oct 6 '06 #3

P: n/a
mistral wrote:
>
How to deal with source code? What format need be source files to
compile? I have source code on
html pages, or in .txt format (this is assembler, not c, but there is
no big difference, i think). What suitable editor to edit source code?
Notepad? What format source need be saved?
C programs are made of text files.
Some compilers expect the name of a C program file
to end in .c, that's specifically a dot followed by a lower case c.
There can also be other extensions on other filenames in a C program.

--
pete
Oct 6 '06 #4

P: n/a

pete писал(а):

mistral wrote:

How to deal with source code? What format need be source files to
compile? I have source code on html pages, or in .txt format (this is
assembler, not c, but there is no big difference, i think). What
suitable editor to edit source code? Notepad? What format source need
be saved?
C programs are made of text files.
Some compilers expect the name of a C program file
to end in .c, that's specifically a dot followed by a lower case c.
There can also be other extensions on other filenames in a C program.
--
pete
-------

so, I just need save text file as with c extension, i.e. 'file.c'
(since this file type isn't registered in system, windows will save it
as file.c.txt) Same thing for nasm, i need save file as 'file.s'?

m.

Oct 7 '06 #5

P: n/a
mistral wrote:
>
pete писал(а):

mistral wrote:

How to deal with source code? What format need be source files to
compile? I have source code on html pages, or in .txt format (this is
assembler, not c, but there is no big difference, i think). What
suitable editor to edit source code? Notepad? What format source need
be saved?
C programs are made of text files.
Some compilers expect the name of a C program file
to end in .c, that's specifically a dot followed by a lower case c.
There can also be other extensions
on other filenames in a C program.
so, I just need save text file as with c extension, i.e. 'file.c'
(since this file type isn't registered in system, windows will save it
as file.c.txt)
That won't work if the compiler is looking for file.c
You would need to find some way to end a file name with .c
Maybe you can register the file type
or maybe you can change the file name to file.c
after the editor saves the file as something else.

--
pete
Oct 7 '06 #6

P: n/a
In article <11**********************@e3g2000cwe.googlegroups. com>,
mistral <po*******@softhome.netwrote:
>so, I just need save text file as with c extension, i.e. 'file.c'
(since this file type isn't registered in system, windows will save it
as file.c.txt)
Recently in one of the newsgroups someone suggested putting "" around
Windows filename to force Windows to accept it exactly as is.

Also, if you have windows show you the file extensions then
you can do a rename of the extension.
--
Prototypes are supertypes of their clones. -- maplesoft
Oct 7 '06 #7

P: n/a
mistral wrote:
(since this file type isn't registered in system, windows will
save it as file.c.txt)
I suspect it is Notepad (or some other application) that is adding
the .txt extension to the file. Not Windows itself.

Jussi Jumppanen
Zeus For Windows - "The ultimate programmer's editor/IDE"
http://www.zeusedit.com

Oct 9 '06 #8

P: n/a
ju****@zeusedit.com writes:
mistral wrote:
>(since this file type isn't registered in system, windows will
save it as file.c.txt)

I suspect it is Notepad (or some other application) that is adding
the .txt extension to the file. Not Windows itself.
<OT>
Notepad doesn't add an extension if you specify a file name that
already has one. If you tell it to save to foo.c it will save to
foo.c . If you tell it to save to foo, it will save to foo.txt . If
you tell it to save to "foo" (with the quotation marks), it will save
to foo .

I would expect other Windows text editors and other program to behave
similarly.

I wouldn't use Notepad to edit C code, but I don't do Windows
programming, so I don't have an alternative to suggest.
</OT>

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Oct 9 '06 #9

P: n/a
Op 8 Oct 2006 18:53:44 -0700 schreef ju****@zeusedit.com:
mistral wrote:
>(since this file type isn't registered in system, windows will
save it as file.c.txt)

I suspect it is Notepad (or some other application) that is adding
the .txt extension to the file. Not Windows itself.

Jussi Jumppanen
Zeus For Windows - "The ultimate programmer's editor/IDE"
http://www.zeusedit.com
<OT>
No, it's really you, I'm sorry;-(
Tell Windows to show extensions and it will only add the .txt extension if
you didn't. If you tell it's file.c then it won't add a superfluous .txt.
As simple as that ;-)
</OT>
--
Coos
Oct 9 '06 #10

P: n/a
Coos Haak <ch*****@hccnet.nlwrites:
Op 8 Oct 2006 18:53:44 -0700 schreef ju****@zeusedit.com:
>mistral wrote:
>>(since this file type isn't registered in system, windows will
save it as file.c.txt)

I suspect it is Notepad (or some other application) that is adding
the .txt extension to the file. Not Windows itself.

<OT>
No, it's really you, I'm sorry;-(
Tell Windows to show extensions and it will only add the .txt extension if
you didn't. If you tell it's file.c then it won't add a superfluous .txt.
As simple as that ;-)
Doesn't it do exactly the same thing whether you tell it to show
extensions or not?

I suspect the OP observed that Windows adds a ".txt" extension if
there's no '.' in the specified file name, and incorrectly assumed
that it would do so if there is a '.' in the specified file name.
</OT>
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Oct 9 '06 #11

P: n/a

Keith Thompson wrote:
Coos Haak <ch*****@hccnet.nlwrites:
Op 8 Oct 2006 18:53:44 -0700 schreef ju****@zeusedit.com:
mistral wrote:
(since this file type isn't registered in system, windows will
save it as file.c.txt)

I suspect it is Notepad (or some other application) that is adding
the .txt extension to the file. Not Windows itself.
<OT>
No, it's really you, I'm sorry;-(
Tell Windows to show extensions and it will only add the .txt extension if
you didn't. If you tell it's file.c then it won't add a superfluous .txt.
As simple as that ;-)
Doesn't it do exactly the same thing whether you tell it to show
extensions or not?
I suspect the OP observed that Windows adds a ".txt" extension if
there's no '.' in the specified file name, and incorrectly assumed
that it would do so if there is a '.' in the specified file name.
</OT>
----------------------------

Just tried to test the issue again, windows provides c file:

File name: test.c
Save as type: Text Documents(*.txt)
Encoding: UTF-8

This c file have a text doc icon, though.

If selected option in 'Save as type' is 'All Files', this does not
affect on file type (importand when create html files). So probably
Save as type: Text Documents(*.txt) need be used.

m.

Oct 11 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.