• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

anyone know how to code in ...

macka

Senior member
assembly language?? and where i can find some examples of programs such as one that finds the longest paldindrome in a file?
~macka
 
Eeek.
Nowadays, next to no one programs in assembler, because programs typically run under Windows. Strangely, even for command line linux I have rarely seen assembler.

File handling (this works with software interrupts in assembler) is a little tricky.
Here is my suggestion:

Program the whole thing in C/Pascal/Basic and rest assured that computers nowadays do that at reasonable speed.

or:

Do all the file handling in C, and do the time critical stuff in assembler. You can place assembler code directly in C code, if I am not completely wrong with asm{}, maybe it was #asm (as a compiler directive)...

C compilers these days will likely producer better assembler code than you if you do it for the first time.
 


<< Strangely, even for command line linux I have rarely seen assembler. >>


Portability and development time, 'nuff said 😉
 
There's virtually no reason to use asm at all, all you do is make your program more complicated, harder to maintain, non-portable and potentially slower. Trust in the compiler of your language of choice to generate asm for you, it's got more practice than you =)
 
Well assembler is still very used. The Linux kernel has many parts in assembly, embedded systems are usually programmed in
assembly just to state a few examples... anything that get near the hardware will be programmed in assembler



<< non-portable and potentially slower. Trust in the compiler of your language of choice to generate asm for you >>


I wouldn't, I have seen to many examples of what code the compilers generate... it's a bloat compared to what
a good assembler programmer would generate... and slower only if you don't know what you're doing...



 
Back
Top