I would like to set the video mode in a ASM kernel I'm working on to a video mode 1920x1080 or higher (or at least higher than the usual limit in VESA). Is there anyway to do that, and if so, provide sample code?
I'm using NASM to code the kernel.
...
Hello,
I'm learning assembly language. I started with Paul A. Carter's PC Assembly Language which uses NASM (The Netwide Assembler). Then in the middle I switched and started reading Introduction to 80×86 Assembly Language and Computer Architecture which uses MASM.
In NASM I used to write, for initializing a byte
db 110101b
In MA...
What are the syntax differences between the NASM and MASM assemblers?
...
Is there a utility like CodeView that I can use to step through code assembled by NASM where I can see the current state of the registers/memory?
...
In my project I need to use inline Assembly, but it need to be Nasm, because I'm not too much familiar with GAS.
My try:
void DateAndTime()
{
asm
(.l1: mov al,10 ;Get RTC register A
out RTCaddress,al
in al,RTCdata
test al,0x80 ;Is update in progress?
jne .l1 ; yes, wait
mov ...
I've already done a part of my OS in Assembly, but now I want to build a own bootloader for it too instead of using GRUB. When I was developing my test OS in Assembly I remember that I boot it like this:
org 0x7c00
bits 16
; OS Kernel Here
times 510 - ($-$$) db 0
dw 0xAA55
This I've already know. Now I want to use this and execute t...
Hello
I found this sample tutorial The clueless guide to Hello World in nasm about basic ASM, when I compile it, everyting goes just fine!!! Great, but when I run it I get this message:
This version of hi.com is not compatible with the version of Windows you are running
This happens on Windows 7 x64 (Which i was told would run fine...
I am trying to write a function to convert hexadecimal values to decimal values using Nasm.
The basic method would be to take the hex number and multiply by 16 to the power of the place you are in (tens {0}, hundreds {1}, etc). I cannot think of how to write this in the assembler.
...
I have a sample assembly file that I compile with nasm:
nasm -f elf syscall.asm
This generates a syscall.o file. I try to link it with ld:
ld -o syscall syscall.o
The ld command fails with the following error:
ld: i386 architecture of input file `syscall.o' is incompatible with i386:x86-64 output
However, if I do
ld -o syscall...
I want to program in NASM assembly language. I have NASM 2.07 and Borland C++ compiler 5.0 (bcc32). My OS is Windows 7. I do not know how to do input and output with NASM in Windows platform. Please can you help me?
...
Please give me a NASM 2.07 sample program which reads and prints a character. Also please tell the commands to assemble and link it. My compiler is Borland C++ 5.0(bcc32) and OS is Windows 7. Where can I get tutorials about I/O in NASM with Windows 7?
...
I want to use mouse from a boot loader, but the int33h is not working, (DOS interrupt, and there is no DOS booting),so can you help me, how can I read the mouse position, status, etc without using int33h?
Thanks
...
hi,
there is something i can't digest. I'm learning some assembler and right now i'm at chapter with addressing. I understand the concept of brackets for dereferencing, but somehow when I see the usage of it I just can't soak up the point of it. To be a little bit more exact here is where my confusion started:
mov al, [L1]
ok here I s...
MOV is probably the first instruction everyone learns while learning ASM.
Just now I encountered a book Assembly Language Programming in GNU/Linux for IA32 Architectures By Rajat Moona which says:
But I learnt that it is MOV dest, src. Its like "Load dest with src". Even Wiki says the same.
I'm not saying that the author is wrong. I...
Hello everybody,
I've got a question concerning nasm and its linkage to C++. I declare a litte test function as
extern "C" void __cdecl myTest( byte i1, byte i2, int stride, int *width );
and I call it like this:
byte i1 = 1, i2 = 2;
int stride = 3, width = 4;
myTest( i1, i2, stride, &width );
the method only serves to debug assembl...
I am beginning some experimentation in writing a kernel and having fun doing it. I have the basic boot-loader done and the following directives:
[BITS 16]
[ORG 0x0000]
In the kernel tutorial, however, it starts with:
[ORG 0x0000]
[BITS 16]
I was wondering if the order in which these directives are given makes a difference? I am...
We are working on a project to learn how to write a kernel and learn the ins and outs. We have a bootstrap loader written and it appears to work. However we are having a problem with the kernel loading. I'll start with the first part:
bootloader.asm:
[BITS 16]
[ORG 0x0000]
;
; all the stuff in between
;
; the bottom of ...
I'm just curious as to the possibility of loading and executing elf files on OSX. I know the standard executable format is MACHO, but NASM is unable to generate debug information for MACHO objects (and I am required to use NASM). I imagine its a long shot, but I don't suppose I can use ELF files. I can build them with NASM, but I can'...
Is it possible to square a number stored in a register (say eax) without doing any multiplication (by using shifts, etc)? I will be squaring a 16-bit number in 32-bit assembly so overflow shouldn't be an issue. I am using NASM x86 assembly to create the program. Thanks in advance for your help.
...
Hello.
I've literally only just started looking to learn Assembly language. I'm using the NASM assembler on Windows Vista.
Usually, when I begin to learn a new language, I'll copy someone else's Hello World code and try to understand it line-by-line. However, I'm finding it suprisingy difficult to find a Hello World program that doesn...