Forum: Assembly Dec 25th, 2007 |
| Replies: 3 Views: 942 In my opinion its bad practice to do that. Though as already said its valid if EBX remains unchanged after the function returns. |
Forum: Assembly Dec 25th, 2007 |
| Replies: 3 Views: 708 INT 21h are DOS interrupts not ment to be used in Windows. |
Forum: Assembly Dec 25th, 2007 |
| Replies: 7 Views: 8,847 Sorry I am not familar with AMD64 processors. If they still follow 0x86 architecture the code pasted above should work because the processor should boot up in realmode (16bit), the 32bit processors... |
Forum: Assembly Jun 7th, 2007 |
| Replies: 1 Views: 1,923 Hmm the original state before a jump is to not do a jmp at all or patching the jmp opcodes with nop's. Obviously this isnt MASM but a dissassembled binary. If you mean restoring the state before a... |
Forum: Assembly May 30th, 2007 |
| Replies: 2 Views: 1,587 Yup.
Look at these lines:
a byte 1,3,5,7,9
.........
mov esi,offset a
mov ecx,5 |
Forum: Assembly Apr 3rd, 2007 |
| Replies: 7 Views: 2,404 Back in DOS days the FPU was software emulated by an interrupt which a modern processor should never interrupt to. In otherwords you'll need the CPU to trigger that interrupt, a ancient system that... |
Forum: Assembly Feb 13th, 2007 |
| Replies: 3 Views: 1,501 For information on BIOS/DOS interrupt services you can retrieve them in a well known site - ralphs brown interrupt list: http://www.ctyme.com/intr/int.htm
I wont be doing your dirty work. If you... |
Forum: Assembly Jan 11th, 2007 |
| Replies: 7 Views: 5,102 If you ask me, this isn't so efficent when it comes to instruction prefetch caches. These days its better to loop then unroll them. :) |
Forum: Assembly Jan 7th, 2007 |
| Replies: 8 Views: 4,121 You use the TEST instruction, I'm assuming that you are working with IA32 architecture.
Example:
mov ax, myBinaryValue
mov dx, 0000000000000001b ; first ROR will make this most... |
Forum: Assembly Dec 17th, 2006 |
| Replies: 8 Views: 4,121 From what I understand, you want to count the number of digits in binary form, ex. 10001 (decimal 17) has 5 digits. You simply test the most significant towards least significant bits untill you... |
Forum: Assembly Dec 10th, 2006 |
| Replies: 10 Views: 5,201 If were talking machine code as is, not the whole executable/object formats, the instruction set would stay portable assuming its run under the same processor architecture. However platform rules,... |
Forum: Assembly Nov 4th, 2006 |
| Replies: 8 Views: 5,210 I think this is because you also copy null or ambigious bytes trailing the actual input string into the reversed one. For instance "abc" may be last 3 bytes of 80 byte reverse buffer as the first 77... |
Forum: Assembly Nov 3rd, 2006 |
| Replies: 4 Views: 3,321 9A 06 00 70 00 == call far absolute 0070:0006h (706h)
Typically the assemblers will generate relative calls insted of absolute, unless in the source you directly give it an abosute address, which... |
Forum: Assembly Oct 18th, 2006 |
| Replies: 5 Views: 2,193 Maybe you should explain with you mean by "perspective" I'm not really sure what you mean. How would you "see" the speed of the I/O instructions?
I'm not sure what you mean by increasing size of... |
Forum: Assembly Oct 18th, 2006 |
| Replies: 1 Views: 1,415 It would of been a lot quicker to get to the point and ask the actual question, now you gotta reply with the question and wait for another reply. Anyway, I've been using MASM quite some time now and... |
Forum: Assembly Oct 14th, 2006 |
| Replies: 5 Views: 2,193 If you mean why the compiler doesn't reorder those instructions to optimise, its simply because compilers don't know what the hardware is. Most I/Os require some things sequenced which cannot be... |
Forum: Assembly Oct 14th, 2006 |
| Replies: 5 Views: 5,386 Its worth it if you plan stay close with hardware. One of the other reasons why I wanted to learn assembly was to upgrade my debugging skills when writting in higher languages. Its definitly not a... |
Forum: Assembly Sep 20th, 2006 |
| Replies: 1 Views: 2,113 Are you sure you want to mess with the BIOS firmware first of all? Be aware that its typical for any kernel to rely on some BIOS interrupt services, and more importantly the firmware have code to... |
Forum: Assembly Sep 8th, 2006 |
| Replies: 2 Views: 6,460 32 byte dividend is enormous.. out of curiousity why do you have to divide such a precised or huge number? Secondly, what is exactly efficent, the code algorithm in size or how fast can you produce... |
Forum: Assembly Aug 30th, 2006 |
| Replies: 2 Views: 1,597 I'm not 100% sure what your trying to ask, but I'm guessing its on the lines of "Where is the descriptor table located in linear memory?" Well yes it can reside in physical memory and generally is,... |
Forum: Assembly Aug 30th, 2006 |
| Replies: 7 Views: 8,847 Hi,
Typically for boot sectors its best if we use BIOS interrupts to print text to the screan because this will reduce the code size where we only have 512 bytes to do everything. However to... |
Forum: Assembly Aug 5th, 2006 |
| Replies: 3 Views: 2,477 You will basically have to come up with a code to test the frequency of the processor, which is basically a while loop that counts the clocks within a time frame. To find the frequency of older... |
Forum: Assembly Aug 5th, 2006 |
| Replies: 4 Views: 2,591 1. Your OS has a video card driver?
2. Your OS has implemented a HAL? (Hardware Abstraction Layer?)
If #1 is not met, but have #2 in your OS you can start by supplying a VESA compliant driver.... |
Forum: Assembly Jul 25th, 2006 |
| Replies: 7 Views: 8,847 Hi,
It doesn't work because you've not set up DS segement register, as of what you have in the code, its ambigous and while your at it, its best to leave other regularly used segment registers... |