Forum: Assembly 15 Days Ago |
| Replies: 2 Views: 246 Yes, DWORD alignment is always preferred. But check with the standard literature on optimization:
http://www.agner.org/optimize/ |
Forum: Assembly 20 Days Ago |
| Replies: 3 Views: 297 |
Forum: Assembly 20 Days Ago |
| Replies: 4 Views: 378 Try this:MOV AL, DAY
CBW
DIV DIVISOR |
Forum: Geeks' Lounge 21 Days Ago |
| Replies: 179 Views: 8,212 As to where Daniweb is located, a little 'net searching can shed light on that. For instance, I found this Frugal Friday interview which is very interesting to listen to:... |
Forum: Geeks' Lounge 21 Days Ago |
| Replies: 179 Views: 8,212 Just a quick note about this "unaurthaurised distribution" of a protected product: Microsoft has provided an authorized download (including a valid install key) of its OSs in certain instances.
... |
Forum: Assembly Aug 18th, 2009 |
| Replies: 16 Views: 848 wildgoose -
Please consult the Narue tutorial that tomtetlaw was talking about:
http://www.daniweb.com/forums/thread41309.html
Pay attention to the discussion of the C calling convention. |
Forum: Assembly Aug 17th, 2009 |
| Replies: 16 Views: 848 wildgoose -
What you are thinking of is the old '*.com' and '*.exe' formats for DOS which had a segmented memory model. Yes, the '*.com' files were restricted to the SMALL data model which... |
Forum: Assembly Aug 17th, 2009 |
| Replies: 16 Views: 848 No, wildgoose. What you are saying simply can not happen.
The sections are separated in the object file. The linker may even choose to re-order them when it creates the executable file. The... |
Forum: Assembly Aug 17th, 2009 |
| Replies: 16 Views: 848 Which gcc port are you using? If it is cygwin, then that might be your problem.
Try MingW -- I've always had success with it.
http://www.mingw.org/ |
Forum: Assembly Aug 9th, 2009 |
| Replies: 5 Views: 597 An alternative is to use the Alink downloads:
http://alink.sourceforge.net/download.html
; To assemble: nasm -f obj hw.asm
; To link: alink -oPE hw .obj win32.lib
extern MessageBoxA ... |
Forum: Assembly Jun 3rd, 2009 |
| Replies: 2 Views: 666 Here is a wonderful resource to help you understand the proper use of FPU instructions:
http://webster.cs.ucr.edu/AoA/Windows/HTML/RealArithmetic.html#998833 |
Forum: Assembly Jun 3rd, 2009 |
| Replies: 1 Views: 631 For 64-bit specific information, look here:
http://www.turboirc.com/asm/
http://www.vikaskumar.org/wiki/index.php?title=X86-64_Tutorial
http://www.x86-64.org/
... |
Forum: Assembly Jun 1st, 2009 |
| Replies: 2 Views: 547 Well, clock cycles certainly do not equate to execution time on modern processors. But, if you still think you need to know this information, then go directly to the source:
... |
Forum: Assembly Jun 1st, 2009 |
| Replies: 3 Views: 648 Microsoft has good C code with excellent descriptions at its Win32 API reference library:
http://msdn.microsoft.com/en-us/library/aa373078(VS.85).aspx
Click on the "Performance Counters... |
Forum: Assembly May 4th, 2009 |
| Replies: 6 Views: 416 To write text to the console, first use GetStdHandle:
http://msdn.microsoft.com/en-us/library/ms683231(VS.85).aspx
Use that to get the handle for the StdOut device. Then you can use this... |
Forum: Assembly Jan 28th, 2009 |
| Replies: 12 Views: 16,611 Some 64-bit resources:
http://www.viva64.com/links/64-bit-development/
http://www.vikaskumar.org/wiki/index.php?title=X86-64_Tutorial
http://msdn.microsoft.com/en-us/library/ms794533.aspx
... |
Forum: Assembly Jan 28th, 2009 |
| Replies: 2 Views: 441 http://www.viva64.com/links/64-bit-development/
http://www.vikaskumar.org/wiki/index.php?title=X86-64_Tutorial
http://msdn.microsoft.com/en-us/library/ms794533.aspx
http://www.x86-64.org/
... |
Forum: Assembly Jan 5th, 2009 |
| Replies: 2 Views: 680 Insert a CWD instruction right before the DIV instruction. This will sign-extend AX into the DX:AX pair needed for the ('dword' divided by 'word') division.
Nathan. |
Forum: Assembly Dec 20th, 2008 |
| Replies: 2 Views: 1,402 You will need to tweak 'termios' to get non-buffered input to work. Read this thread for code and discussion of the issue:
... |
Forum: Assembly Dec 20th, 2008 |
| Replies: 3 Views: 1,672 There is a nice tutorial in this thread:
http://www.daniweb.com/forums/thread41309.html
For 64-bit, you'll find resources (and Linux examples) here:
... |
Forum: Assembly Oct 15th, 2008 |
| Replies: 1 Views: 616 These tutorials will show you how:
http://win32assembly.online.fr/tutorials.html |
Forum: Assembly Oct 14th, 2008 |
| Replies: 1 Views: 1,936 Some Assemblers that have 64-bit support:
FASM
http://flatassembler.net/
NASM
http://www.nasm.us/
YASM
http://www.tortall.net/projects/yasm/ |
Forum: Assembly Sep 24th, 2008 |
| Replies: 2 Views: 906 Some resources and existing code to learn from:
http://asm.sourceforge.net/
[note: the AsmUtils package has not been updated for years, so some of those examples will not work on modern... |
Forum: Assembly Sep 21st, 2008 |
| Replies: 5 Views: 1,005 Ah, but my example stays within the specs. The question said *nothing* about the data being pre-computed or not:
Write a program that prints the numbers from 1 to 100. But for multiples of three... |
Forum: Assembly Sep 11th, 2008 |
| Replies: 5 Views: 1,005 The first rule of code optimization is:
Eliminate conditional branches. Use lookup-tables instead.
The second rule of code optimization is:
If possible, remove any loops.
So, keeping to... |
Forum: Assembly Sep 10th, 2008 |
| Replies: 1 Views: 536 Some suggested reading material:
http://www.drpaulcarter.com/pcasm/
http://www.kipirvine.com/asm/
http://savannah.nongnu.org/projects/pgubook
http://webster.cs.ucr.edu/AoA/index.html |
Forum: Assembly Sep 9th, 2008 |
| Replies: 5 Views: 1,005 I posted this because I consider it a "trick question" to some extent. As we hone our "problem-solving" skills, it is natural for us to attempt a clever solution. All too often, however, clever... |
Forum: Assembly Sep 9th, 2008 |
| Replies: 2 Views: 1,712 An application programmer doesn't use interrupt (int) calls in Windows. Instead, one makes a call to a function in one of the DLLs supplied by the system. The reference for these functions can be... |
Forum: Assembly Sep 6th, 2008 |
| Replies: 5 Views: 1,005 It's a FizzBuzz question designed to "separate the men from the boys", so don't cheat. :)
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of... |
Forum: Assembly Jul 26th, 2008 |
| Replies: 3 Views: 1,342 Thank you! It looks nice.
BTW, I can confirm that if you remove the underscores ( change the "_main", "_printf", and "_scanf" symbols to just "main", "printf", and "scanf" ) it assembles ( using... |
Forum: Assembly Jul 25th, 2008 |
| Replies: 3 Views: 1,342 Yes. Please post the code. I would like to see it.
Nathan. |
Forum: Getting Started and Choosing a Distro Jun 5th, 2008 |
| Replies: 1 Views: 860 Here is a nice "cheat sheet" for getting "up and running" quickly:
http://freeengineer.org/learnUNIXin10minutes.html |
Forum: Assembly Dec 10th, 2007 |
| Replies: 1 Views: 2,417 Frank recently posted the following code in the alt.lang.asm newsgroup.
;---------------------------------
; nasm -f bin -o hwnoint.com hwnoint.asm
org 100h
push word 0B800h ;... |
Forum: Assembly Nov 27th, 2007 |
| Replies: 3 Views: 2,791 Processor manuals are your best choice.
Intel --
http://www.sandpile.org/docs/intel/ia-32.htm
AMD --
http://www.sandpile.org/docs/amd/k6.htm |
Forum: Assembly Nov 27th, 2007 |
| Replies: 4 Views: 963 Download "disasm.zip" from the Files section of AoAProgramming:
http://groups.yahoo.com/group/aoaprogramming/
It is a good place to start on coding a modern-day disassembler/debugger.
... |
Forum: Assembly Nov 8th, 2007 |
| Replies: 3 Views: 2,791 Taking the "fright" out of Opcodes and Hex-numbers.
High Level Assembly (HLA) is a modern assembler + standard library package that allows a programmer to ease his way toward ASM coding by... |
Forum: Assembly Oct 22nd, 2007 |
| Replies: 14 Views: 3,429 That is a DOS system call... it will only work on Linux if you are running a DOS emulator. Nothing wrong with that, but since you are using Linux, why not run your programs natively? Some Linux... |
Forum: Assembly Oct 15th, 2007 |
| Replies: 2 Views: 857 Here is some reading material:
http://del.icio.us/Evenbit/OS
Nathan. |
Forum: Assembly Oct 15th, 2007 |
| Replies: 2 Views: 857 You have several "int 0x21" calls in your code. These are DOS calls:
http://www.ctyme.com/intr/int-21.htm
Since DOS is not loaded (indeed, you are writing your own OS), then you cannot use... |
Forum: Assembly Oct 9th, 2007 |
| Replies: 1 Views: 4,727 You can find tutorials and examples here:
The Operating System Resource Center
http://www.nondot.org/sabre/os/articles
OS FAQ Wiki
http://www.osdev.org/osfaq2/
Nathan. |