473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Dealing with source code

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
11 1953


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
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
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

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
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
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
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
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
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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ashtonn | last post by:
Hello, I am trying to fill a packet with source and destination mac address. The first 6 bytes hold the destination mac address and the next six bytes hold the source mac address. In the code i am...
1
by: news.microsoft.com | last post by:
Hello group, My goal is to attach an image over another image. Top image should be transparent so the back image is visible through the top one. Bellow is a test code in VB.NET. You need to...
2
by: rdshultz | last post by:
using access 2000. Have a form based on a couple of controls, it finds the last used Inquiry number in a table. So it finds the highest Inquiry number for the "Office" , "Company" and "YearStamp"...
19
by: Linda | last post by:
In classic ASP I used to have a file called settings.asp included on every page of my web, it consisted of a number of different settings unique to this application, among them the database path...
4
by: Steve | last post by:
Hi All, I've picked up the PyParsing module and am trying to figure out how to do a simple parsing of some HTML source code. My specific problem is dealing with an <TD></TDelement that is...
5
by: Paul Miller | last post by:
I'm looking at doing some currency calculations in some Python code integrated with a C++ application. I want to be able to come up with the same values I get in an Excel spreadsheet. I've been...
5
by: _dee | last post by:
I'm working on a port of a legacy app originally written in C. Data was compacted into bit fields. Are there any sites or books that cover optimized handling of this type of data? I'd need to...
42
by: lorlarz | last post by:
Contrary to what one authority in the JavaScript field says: JavaScript does make errors when dealing with just with integers. This authority (Douglas Crockford.) says: "integer arithmetic in...
0
by: raylopez99 | last post by:
I ran afoul of this Compiler error CS1612 recently, when trying to modify a Point, which I had made have a property. It's pointless to do this (initially it will compile, but you'll run into...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.