I currently have an assembly program which is modeled after the hexdump system function in Linux. Essentially, it prints the current line number, converts the binary values to hexadecimal strings and also shows the current ASCII associated with the hexadecimal string.
I'm experiencing a problem with my system of printing line numbers. T...
The code i am trying to run is bellow.
I use nasm util to convert it into object file. When i tried to execute it says "can not execute binary file".
I run the command:
nasm -f elf -o helloworld.o helloworld.asm
segment .data
msg db "Hello, world!",10
len equ $ - msg
segment .text
global _start
_start:
mov eax,4
mov ebx,...
Hey some im writing a bootloader using nasm a virtual machine ect. Anyhow, im using vram to display background and font color changes triggered by keys s, d, f, g. S switches the color of the font with the background color. I know how this can be done but i do not know the proper way. vram is setup as so 2 bytes the first is the charact...
I need a random number generator function written in nasm.
I'm sorry for asking, but I couldn't find any!
...
i am passing two strings from a c file to asm file as parameters. then i move these to ecx and edx from stack. how can i know exactly what their lengths are? like strlen(string) in c?
push ebp
mov ebp,esp
mov ecx,[ebp+8]
mov edx,[ebp+12]
...
Is there any reason why MUL operator is only in single operand form?
IMUL operator can be in three different forms (with one, two or three operands) and this is much more convenient. From the technical point of view I don't see any reason why MUL operator can't be in two/three operands form.
...
I'm writing a game in assembly, and I need to check if a key was pressed.
So, how is kbhit implemented in Linux?
Thanks.
...
I came across these two lines in osdev wiki.
nasm kernel.asm -f bin -o kernel.bin
dd if=kernel.bin of=/dev/fd0
It copies the kernel binary to a flopy. Does this means the flopy becomes bootable? I don't want to create a bootable flopy , instead of that I want to create a iso image by which I can boot in vmware. is it possible? If...