Assembler for puppy?
- KusaNoKaito
- Posts: 99
- Joined: Fri 19 Feb 2010, 22:52
- Location: Florida
- Contact:
Assembler for puppy?
Hi! simple question, is there an assembler available for puppy?
If there is not and other people here want the same, I could try packaging some of the assemblers I use?
If there is not and other people here want the same, I could try packaging some of the assemblers I use?
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
The version included in devx is 0.98.39 dated Oct 22,2007.
The latest stable version at their site http://www.nasm.us/ is 2.07.
And version 2.08 is in development.
According to their site it supports 64bit processors too.
The latest stable version at their site http://www.nasm.us/ is 2.07.
And version 2.08 is in development.
According to their site it supports 64bit processors too.
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
You might like to try Linoleum assembler (you will have to compile it first)
http://en.wikipedia.org/wiki/Linoleum_( ... _language)
last Puppy compiling attempted here
http://www.murga-linux.com/puppy/viewto ... 951#100613
http://en.wikipedia.org/wiki/Linoleum_( ... _language)
last Puppy compiling attempted here
http://www.murga-linux.com/puppy/viewto ... 951#100613
My naive dumb question.
When I used MS DOS and used several of their assemblers and C compilers and Pascal and such. then the executables had .com and was standalone things in that one clicked on them and they run.
what is it in Linux that one do assembler and how does one run them?
What can one do with them?
When I used MS DOS and used several of their assemblers and C compilers and Pascal and such. then the executables had .com and was standalone things in that one clicked on them and they run.
what is it in Linux that one do assembler and how does one run them?
What can one do with them?
I use Google Search on Puppy Forum
not an ideal solution though
not an ideal solution though
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
apparently yasm is in at least Quirky 003 and probably later versions . . .
fasm info
http://flatassembler.net/
fasm info
http://flatassembler.net/
The standard Linix assembler is "as". It's available for Puppy as part of the DEVX toolset. In the old days in Unix, the C compiler "cc" would compile to assembler source, which was then assembled by as to create object filesthat were linked to form an executable by "ld". It was possible for the programmer to interrupt the process before as was called, and hand optimize the assembler code generated by cc for performance, before having it assembled and linked. These days, compilers do their own optimization, and can generally do it better than the programmer.nooby wrote: When I used MS DOS and used several of their assemblers and C compilers and Pascal and such. then the executables had .com and was standalone things in that one clicked on them and they run.
what is it in Linux that one do assembler and how does one run them?
What can one do with them?
".com" files are a relic of the addressing model used by the Intel 8088 CPU used in early PCs. Intel CPUs use a "segmented" architecture. On the 8088, with a one megabyte address space, a segment was 64K. There were half a dozen different memory models a DOS programmer had to deal with, depending upon whether both code and data fit in 64K, or code fit in 64K, but data required another segment, or code fit in 64K, but data required more than an additional 64K segment, or code required more than 64K, etc.
Code branching within a 64K segment was fairly simple. Branching was to offset from the current location. Code that needed to cross segments required "far calls", and got more complicated. Branching was to segment:offset. "com" files under DOS and Windows were all programs that could be done in 64K or less. Beyond 64K, you dealt with EXE files. It's entirely possible to write large EXE application entirely in Assembler, and a variety exist. But things tend to be easier to write and maintain in a higher level language like C.
On 32 bit machines using the 80386, 80486, or Pentium class CPUs, a segment is 4 gigabytes, and the issues faced by old DOS programmers don't exist.
Folks used to write write in Assembler for performance. When the CPU on the PC runs at 4.77mhz, you can run into cases where the machine just isn't fast enough to do what you want in a high level language and you need to get low level to get the performance.
On current hardware, CPU speed is seldom the limiting factor. Most PCs are "I/O bound", not "compute bound". The bottleneck will be reading from/writing to disk, which is why more RAM is the first suggestion for boosting performance, to reduce the need to read from and write to disk. In most of what users do on PCs, the CPU spends most time in a wait state, waiting for user input or for a disk operation to complete, and all machines wait at the same speed.
Can you write in assembler for Linux? Sure. The question is why you would need to. Writing in C or C++, standard system libraries handle a lot of things for you, like startup code. Writing in assembler, you have to handle that yourself. About the only time I can see resorting to assembler is when writing a device driver where you must do low lever hardware access. Even then, you may not have to.
In addition, assembler is by nature processor specific. The assembler code for an Intel or compatible CPU will be quite different from the code for the IBM/Motorola PPC chips used in older Macs, or the SPARC RISC processors used in Sun Microsystems machines, or the ARM processors used by various smartphones. Write your code in portable C or C++ and you ought to be able to move it to a machine running Linux using a different architecture and compile and build it. Write in assembler and you'll have to rewrite from scratch
______
Dennis
Dennis, I trust you on this so when do we use assembler in Linux then?
The thread starter seems to at least want to have it available just in case him needs it?
One good thing would be to be able to run it all in RAM? Instead of having some 1GB programs fighting over a 1GB Netbook that can not be given more memory we can have a 100KB OS that leave 900KB for applications?
The thread starter seems to at least want to have it available just in case him needs it?
One good thing would be to be able to run it all in RAM? Instead of having some 1GB programs fighting over a 1GB Netbook that can not be given more memory we can have a 100KB OS that leave 900KB for applications?
I use Google Search on Puppy Forum
not an ideal solution though
not an ideal solution though
- KusaNoKaito
- Posts: 99
- Joined: Fri 19 Feb 2010, 22:52
- Location: Florida
- Contact:
I question NASMs power because it is not coded in assembler, its coded in C.technosaurus wrote:the gnu assembler is on the devx sfs as is nasm
Will have a look at that.Lobster wrote:You might like to try Linoleum assembler (you will have to compile it first)
http://en.wikipedia.org/wiki/Linoleum_( ... _language)
last Puppy compiling attempted here
http://www.murga-linux.com/puppy/viewto ... 951#100613
You're right! i enjoy writing programs from the ground up!nooby wrote: The thread starter seems to at least want to have it available just in case him needs it?
One good thing would be to be able to run it all in RAM? Instead of having some 1GB programs fighting over a 1GB Netbook that can not be given more memory we can have a 100KB OS that leave 900KB for applications?
---------
I compiled YASM so people here can use it without installing devx. Note: it appears to be written in several languages.
I've been playing around with writing asm programs for my ti -83 graphing calculator. I have an ide that is set up for the z80 type microprocessor, it's pretty nice. So far I like the "ground up" part but I've only done a couple 'hello world' type programs so my opinion may change later...
I read somewhere that assembly is used by people who reverse engineer software by some how disassembling binaries into asm. Not sure if its true but sounds interesting.
I read somewhere that assembly is used by people who reverse engineer software by some how disassembling binaries into asm. Not sure if its true but sounds interesting.
- KusaNoKaito
- Posts: 99
- Joined: Fri 19 Feb 2010, 22:52
- Location: Florida
- Contact:
Yes there is "dissassemblers" out there people use them to change software crack product keys etc. but why do that when there is open source?2lss wrote:I've been playing around with writing asm programs for my ti -83 graphing calculator. I have an ide that is set up for the z80 type microprocessor, it's pretty nice. So far I like the "ground up" part but I've only done a couple 'hello world' type programs so my opinion may change later...
I read somewhere that assembly is used by people who reverse engineer software by some how disassembling binaries into asm. Not sure if its true but sounds interesting.
Assembly language teaches really good programing, and how your computer actually works. but its not very useful unless you wanna do something really low level.
So is just about everything else. So what?KusaNoKaito wrote:I question NASMs power because it is not coded in assembler, its coded in C.technosaurus wrote:the gnu assembler is on the devx sfs as is nasm
Remember that Assembler is low level code. Each Assembler language instruction normally translates to one machine language instruction.
With a high level language like C/C++. one line in the source file might compile to hundreds of machine language instructions.
With something like GCC, you rely on the compiler to optimize for you, and generate the best machine code from the high level source. and there will always be tradeoffs, as you can optimize for small code size or high speed, but they are largely mutually exclusive.
With Assembler, optimization is on you. You are specifying exactly what machine code is created, instruction by instruction. The assembler is mostly just translating an assembler mnemonic into the equivalent machine instruction.
Writing an assembler in assembler may make it faster to assemble source to object code, but isn't going to make it more powerful.
C was originally designed for systems programming, to be efficient enough that you didn't have to write in assembler to get performance, and you could do things like write operating systems in it. Linux is written in C.
Unless you absolutely have to for some reason, it's usually better to work in a higher level language than to write in assembler. High level coder is easier to write and maintain, and current hardware is fast enough that performance normally isn't a problem.
______
Dennis
Assembler for puppy
Hi Group,
I work with a few of the automotive computer systems, most of the analysis programs and system programs from processor manufacturers are in windows or old dos format. - Getting tools together to program for microprossers has always been my downfall - always missing some lib or other obscure tidbit.
Some of this involves direct hex editing of binary data files.
Thinking about this thread, - In my simple probing of the Puppy system, it seems that programing or modifing an application is more of a natural state of inherent operation - rather than the windows system - at least it is for me, not being very savvy visual basic programer. And having been able to follow and mod apps with Geany.
Are there cross libraries for 8051, old Motorola, Xilinx, and such for use within Puppy? Dah! never even considered the posibility - for all the other researchers i've been in contact used windo tech.
Jay
I work with a few of the automotive computer systems, most of the analysis programs and system programs from processor manufacturers are in windows or old dos format. - Getting tools together to program for microprossers has always been my downfall - always missing some lib or other obscure tidbit.
Some of this involves direct hex editing of binary data files.
Thinking about this thread, - In my simple probing of the Puppy system, it seems that programing or modifing an application is more of a natural state of inherent operation - rather than the windows system - at least it is for me, not being very savvy visual basic programer. And having been able to follow and mod apps with Geany.
Are there cross libraries for 8051, old Motorola, Xilinx, and such for use within Puppy? Dah! never even considered the posibility - for all the other researchers i've been in contact used windo tech.
Jay
Re: Assembler for puppy
I think what you're asking for is not Puppy specific.efiguy wrote: Are there cross libraries for 8051, old Motorola, Xilinx, and such for use within Puppy? Dah! never even considered the posibility - for all the other researchers i've been in contact used windo tech.
Linux development is normally done in GCC, the Gnu Compiler Suite. GCC is modular, and implemented as a front-end parser for the languages GCC supports (C, C++, Ada, Fortran, Objective C and Java), and a back end code generator. This separation makes it possible to use GCC as a cross-compiler, writing code on one architecture (in this case, Intel), but compiling machine code for another, like Motorola 680X0 or ARM.
I don't deal with things like Xilinx microcontrollers, but as far as I know, you can use GCC to build code for them.
Puppy does not include GCC by default. To get GCC for Puppy, you'll need to install the appropriate Devx SFS file, which will get you GCC and the related tools. Setting up GCC as a cross-compiler is a non-trivial process. (I have not done it, but know enough to know it's not simple.)
I'd also look at installing Java and Eclipse. Eclipse is IBM's open source programmer's IDE, written in Java, Eclipse is extensible, and has plugins for embedded development. I believe you can find plugins for Eclipse intended for supporting development on things like 8051 chips.
Take Puppy out of the equation for the moment, and do some research on using GCC for this sort of thing, and using Eclipse as your environment. If you determine it's feasible and you want to pursue it, it should be doable in Puppy or any other Linux distro. The most important limitation will be hardware. GCC and Eclipse aren't small programs, and you'll probably want a reasonable machine running Puppy simply so that doing things doesn't take forever.
______
Dennis
- KusaNoKaito
- Posts: 99
- Joined: Fri 19 Feb 2010, 22:52
- Location: Florida
- Contact: