x86

How Does BIOS initialize DRAM?

寵の児 提交于 2021-01-20 20:07:39
问题 I've been searching all over for an explanation of how exactly BIOS works now for quite some time. I have designed a bootloader and have jumped to 32-bit mode with it while successfully initializing the IDT as well as the GDT, but in doing so, I have found "operating systems" seeming to be quite simple, and the feeling as if "BIOS" IS the actual operating system of every computer. So now I have took on a new challenge of trying to discover how BIOS actually initializes itself, discovers how

How Does BIOS initialize DRAM?

穿精又带淫゛_ 提交于 2021-01-20 20:06:34
问题 I've been searching all over for an explanation of how exactly BIOS works now for quite some time. I have designed a bootloader and have jumped to 32-bit mode with it while successfully initializing the IDT as well as the GDT, but in doing so, I have found "operating systems" seeming to be quite simple, and the feeling as if "BIOS" IS the actual operating system of every computer. So now I have took on a new challenge of trying to discover how BIOS actually initializes itself, discovers how

What does the 0x80 port address connect to?

安稳与你 提交于 2021-01-20 19:19:06
问题 When sending a command and reading the data from a certain chip, say the RTC, different documents say that we should wait for some time before reading from the device to make sure the data is available. Many pieces of code make a dummy read from the port 0x80 . I wanted to know to what device this address location is connected, if any. I am talking with respect to the IA-32 PC architecture. 回答1: I/O port 0x80 is traditionally used for POST Codes. (POST = Power On Self Test) While the system

What does the 0x80 port address connect to?

我的未来我决定 提交于 2021-01-20 19:16:23
问题 When sending a command and reading the data from a certain chip, say the RTC, different documents say that we should wait for some time before reading from the device to make sure the data is available. Many pieces of code make a dummy read from the port 0x80 . I wanted to know to what device this address location is connected, if any. I am talking with respect to the IA-32 PC architecture. 回答1: I/O port 0x80 is traditionally used for POST Codes. (POST = Power On Self Test) While the system

What does the 0x80 port address connect to?

£可爱£侵袭症+ 提交于 2021-01-20 19:15:34
问题 When sending a command and reading the data from a certain chip, say the RTC, different documents say that we should wait for some time before reading from the device to make sure the data is available. Many pieces of code make a dummy read from the port 0x80 . I wanted to know to what device this address location is connected, if any. I am talking with respect to the IA-32 PC architecture. 回答1: I/O port 0x80 is traditionally used for POST Codes. (POST = Power On Self Test) While the system

Having no luck with data NASM

北战南征 提交于 2021-01-20 12:19:50
问题 section .data map db 1 section .text start: cmp byte [map], 1 je exit jmp start exit: ret I'm having no luck reading data. What I mean is that I assemble to the binary dos COM format and when I start it it just freezes. Can someone tell me what i'm doing wrong? 回答1: DOS com files are expected to be loaded at address 0x100. You should include line org 0x100 at the start of your code. 来源: https://stackoverflow.com/questions/26424041/having-no-luck-with-data-nasm

cmp je/jg how they work in assembly

為{幸葍}努か 提交于 2021-01-20 09:34:15
问题 I would like to understand how cmp and je/jg work in assembly. I saw few examples on google but I am still little bit confused. Below I have shown a part of assembly code that I am trying to convert to C language and the corresponding C code. Is it implemented in the right way or do I have a wrong understanding of how cmp works? cmp $0x3,%eax je A cmp $0x3,%eax jg B cmp $0x1,%eax je C int func(int x){ if(x == 3) goto A; if (x >3) goto B; if(x == 1) goto C; A: ...... B: ...... C: ...... 回答1:

cmp je/jg how they work in assembly

十年热恋 提交于 2021-01-20 09:33:08
问题 I would like to understand how cmp and je/jg work in assembly. I saw few examples on google but I am still little bit confused. Below I have shown a part of assembly code that I am trying to convert to C language and the corresponding C code. Is it implemented in the right way or do I have a wrong understanding of how cmp works? cmp $0x3,%eax je A cmp $0x3,%eax jg B cmp $0x1,%eax je C int func(int x){ if(x == 3) goto A; if (x >3) goto B; if(x == 1) goto C; A: ...... B: ...... C: ...... 回答1:

cmp je/jg how they work in assembly

谁都会走 提交于 2021-01-20 09:32:47
问题 I would like to understand how cmp and je/jg work in assembly. I saw few examples on google but I am still little bit confused. Below I have shown a part of assembly code that I am trying to convert to C language and the corresponding C code. Is it implemented in the right way or do I have a wrong understanding of how cmp works? cmp $0x3,%eax je A cmp $0x3,%eax jg B cmp $0x1,%eax je C int func(int x){ if(x == 3) goto A; if (x >3) goto B; if(x == 1) goto C; A: ...... B: ...... C: ...... 回答1:

Iterating through an array in NASM assembly code

女生的网名这么多〃 提交于 2021-01-20 07:30:14
问题 So I'm currently taking an assembly language class and we are trying to create and sort an array from input. I can get the sorting logic just fine, but I'm having a great deal of trouble trying to iterate through the array. For further clarification of what the following code does, we are supposed to read in integers from the command line. The number 0 delimits the end of user input, and then the sorting method is called. That works fine, it's the array iteration that is not working. Here is