- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 4
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: [QUOTE=Rameses;861952]How can I perform Division in Marie Assembly Language? The functions available in Marie programming are for Addition and Subtraction. Any help will be appreciated.[/QUOTE] You can do division using subtraction. 60 / 3 if I subtract 3 from 60 it will take 20 times before 60 < 3 | |
Re: You could try setting up a data segment before using 'data'. I really have no clue where your message data is existing at on your computer. Some dimension created by the bios perhaps. | |
| |
Re: You're not reading in an 'a', it's reading in a binary value that when your O/S prints recognizes as the value for 'a' and since you're putting this value onto an output stream in video it's assumed to be an 'a'. So your ascii 'a' is 0x61h in hex and … | |
Re: No the first one is popping whatever is on the stack at that location, the second one is considering whatever is at that position in the stack to be a memory address and you're saying whatever is at that address copy it into esi. Consider stepping through the code through … | |
Re: So you want like a cuecard type program? Console based? An easy way, given the only specifications you listed, would be to just setup your own record format for each spanish and english companion into a file and then write your functions you'll need to get, add, delete and modify … | |
Re: Just think about it. Given 11 % 3 how would you find the remainder? Well how would you do divide? 11 - 3 = +1 cycle with 8 left over 8 is > 3 so keep going 8 - 3 = +1 cycle with 5 left over 5 > 3 … | |
Re: Well I'd say you're probably not prototyping the functions you want to use from your library properly. Did you write a head file for your library and extern the prototypes? | |
Re: Have you read the MMX literature in the Intel Software developers manual volume 3? It explains the instructions pretty well and even gives you tips on how to optimize them. | |
Re: You could just add '0' to each of your numbers. | |
Re: You can look at the registers through debug | |
Re: There's one very large difference between pascal and C. C contains functions with the ability to accept variable amounts of arguments. Such as... printf. Pascal doesn't have(?)/can't handle variables argument implementations very well. And your call to lets say printf would look like.. [CODE] push eax ;lets say contains the … | |
Re: Either I don't know what you're asking for or this smells like homework. Anyway the param to the function you were asking about [CODE] mov eax,[ebp-08h] push eax mov eax,0051F900h call eax [/CODE] The C calling convention is to push arguments on the stack from right to left. So what … | |
Re: [QUOTE]Now i want to modify the above code so that it encrypts the dststr using Caesar cipher method and which of course will be printed out on the screen aswell. Thanks for ur reply and i hope it makes the point clear if not feel free to ask me. Br. … | |
Re: If I'm understanding you correctly you just want to print the string to command line without using the o/s api MessageBox? Well let's see you could use the interrupt interface; a quick google search for dos print interrupt or the like should lead you to a multitude of tutorials. You … | |
Re: Sorry for the late response been really busy lately. From the code you've posted I don't really see a problem. Here's the best and most useful time to open up gdb. And I'll attempt to explain an easy way to do so! so in my linux asm code I usually … | |
Re: Because they're different syntaxs and not even a little bit different... NASM syntax is based on intel syntax while gas syntax is based on AT&T syntax. If you write a simple hello world program in C and compile it using gcc -S mycode.c It'll leave you with a mycode.s that … | |
Re: [QUOTE=Lamya;861072][B][COLOR="Red"]The OutPut Should Be : Please Enter Capital letters: ABCDE Small Letters in reverse order: edcba [/COLOR][/B][/QUOTE] You know the difference between an upper and lower case character? 20h You know the difference between the binary of an upper and lower case character? 1 bit. Consider the following E - … | |
Re: Can you post the code? Were both computers using the same cpu architecture? | |
Re: [QUOTE=r00ster;861087]My friend is doing a course in computer science and needs help with a few questions considering assembly. Well at least I think it is assembly. Here goes: 1. What alphabetic character will be moved into DL if the mov dl,25h instruction is executed? 2. What is the length of … | |
Re: [QUOTE=Alex_;860075]Hello, how does division works in nasm assembly language? I want to get the least important digits from a binary number. ex: 1001b /10= 100.[B]1[/B]b. The bold signed one is what i like to get. Any suggestions? Further explanation: What i want to do is convert a binary number into … | |
Re: Which part don't you understand? | |
Re: [QUOTE=FandaR;858017] Dont you have some code for it? I havent time to do it. [/QUOTE] Me neither | |
Re: MIPS has a rol/ror (rotate left / rotate right) mnemonic doesn't it? If I couldn't do rotating I imagine I would use ANDing with a combination of shifting. | |
Re: You just want to know how to concatenate two strings in C? [CODE]strcat(my_buffer, my_other_buffer);[/CODE] Although if you're going to placing your new tokens in a completely new area via strcpy and then a strcat you might as well sscanf as I believe it'll be more efficient. | |
Re: You need to post some sort of an attempt and then I'll help you with it. I'll give you a hint though -- If you index through each string at the same time and cmp each time in a loop as long as cmp keeps coming out to be 0 … | |
Re: Try using di instead of trying to do all that crazy addition followed by subtraction. [CODE] mov si,0 mov di, strlen .loop: mov dx , [str + si] mov cx , [str + di] mov [aloc + si], dx mov [aloc + di], cx inc si dec di [/CODE] | |
Re: [QUOTE=destruct0;852074]Hello! I have a problem when I try to do some interrupt in assembly program. When I try to execute, executable file i get this message "Segmentation fault.". Please help? I have this problem almost all interrupts. Sorry for my bad English.[/QUOTE] When you execute your executable it seg faults? … | |
Re: If you have a 32 bit system you could just do something like Either checking if it overflowed into dx or just zeroing everything out before hand [CODE]mov cx, dx shl ecx, 16 mov cx, ax[/CODE] Or you could set aside space on the stack something along the lines of … | |
Re: [QUOTE=Alex_;852405]Hello! I'm trying to swap some characters in this form, in Linux+NASM: abc -> cab -> bca -> abc I tried the following method [code] section .data string: db 'abc',10 strlen: equ $-string section .text global _start _start: mov ebx,1 add ebx,string mov string, [ebx] [/code] But it gives me … |