x86-16

Is pipelining/OoOE available on modern x86 processors when running in real mode?

﹥>﹥吖頭↗ 提交于 2020-08-09 09:11:09
问题 When running a boot-loader program on a modern-day x86 processor, the processor will be running in real-address mode. Will its instruction pipelining features be active in real mode, or not? 回答1: Yes, the out-of-order core in modern microarchitectures operates basically the same regardless of mode . Most of the difference is in the decoders. See Agner Fog's microarch pdf and other links in the x86 tag wiki for details of how modern CPUs actually do work internally. It would probably take

What do ds:si and es:di mean in assembly?

こ雲淡風輕ζ 提交于 2020-07-18 04:19:19
问题 The movsb (move string, bytes) instruction fetches the byte at address ds:si, stores it at address es:di, and then increments or decrements the si and di registers by one. I know esi,si and edi,di registers, but not ds:si and es:di , what do they mean? 回答1: ds:si and es:di mean the segment:offset referred to by the registers in question. This is primarily important when you're working in real mode (where offsets are a maximum of 64K apiece). In real mode, the segment are offset are combined

How to get segment memory address, when i have physical address?

核能气质少年 提交于 2020-07-16 07:01:34
问题 The physical address of the memory cell is given in the form 1A32H. What is the address of the beginning of the memory segment. Or more exactly, the seg:off address I should use to access it. Can someone explain me step by step how to solve this problem? 回答1: In x86 real-mode, the physical address is calculated as: 16 * segment + offset So the physical address 1A32H can be accessed in different ways: Segment = 1A3H, Offset = 2 or Segment = 1A2H, Offset = 12H or Segment = 1A1H, Offset = 22H or

How to set Timer

廉价感情. 提交于 2020-07-10 05:59:27
问题 Is there any way I can set timer 60 seconds with xor ah,ah Enter_Again: xor ah, ah ; I should put 60 seconds here int 16h ; The user should press S before 60 seconds mov bl,al cmp al,"S" 回答1: Your previous questions suggest you are running under DOS. There is no BIOS or DOS call that times out keyboard input. You can latch (chain) onto Interrupt 0x1c which is a user interrupt routine that gets called about 18.2 times a second. One minute is about 1092 of these interrupts. Your timer interrupt

x86 Segmented Memory

£可爱£侵袭症+ 提交于 2020-07-10 05:44:50
问题 While reading The Art of Assembly the other day, I came to the section here on memory layout. It started discussing segmented memory, and I didn't think it made a lot of sense. Splitting memory into segments makes perfect sense as a way for organization, but using the function segment + offset , what do you do when the function repeats its outputs? e.g. 1038 + 57 , 57 + 1038 , and 1095 + 0 all come out to the linear address 1095. Isn't that a bad thing? Wouldn't you accidentally address the

x86 Segmented Memory

风流意气都作罢 提交于 2020-07-10 05:42:38
问题 While reading The Art of Assembly the other day, I came to the section here on memory layout. It started discussing segmented memory, and I didn't think it made a lot of sense. Splitting memory into segments makes perfect sense as a way for organization, but using the function segment + offset , what do you do when the function repeats its outputs? e.g. 1038 + 57 , 57 + 1038 , and 1095 + 0 all come out to the linear address 1095. Isn't that a bad thing? Wouldn't you accidentally address the

Change the color with the user option

淺唱寂寞╮ 提交于 2020-07-09 11:52:07
问题 I'm working in my project with assembly emu8086 and I've done a lot of things: Now I'm struggling to put the option selected by the user. I want to change the leds color from (0-7) using the user option, I've already done a lot of things I only dont understand how I'll do this to change the color, if the user select 1 both squares(leds) need to change to blue and this for all the colors, I need to verify the user option. Here is my code: title ac-cores-mov-cursor.asm - desenha poligno

[Duntemann's Book 3rd Edition]. How could 16-bit 8086 address 16 times as much memory as 8080?

别等时光非礼了梦想. 提交于 2020-07-09 05:25:18
问题 Duntemann says 8086 could address 16 times as much memory as 8080 and has gone on to elaborate upon this as 16 * 64K = 1MB . So I am assuming 16 bits at a time (16-bit processor) * 64K because 16 address lines (2^16). But, by that logic for calculation shouldn't 8080 (8-bit processor) also having 16 address lines have been able to address 8 * 64K = 0.5MB? shouldn't the 8086 then be able to address twice as much as 8080? 回答1: 16x is the difference between 2^20 and 2^16 . The 8080 has 16 bits

error: unsupported size for integer register

谁都会走 提交于 2020-06-29 03:39:16
问题 I'm using i686 gcc on windows. When I built the code with separate asm statements, it worked. However, when I try to combine it into one statement, it doesn't build and gives me a error: unsupported size for integer register . Here's my code u8 lstatus; u8 lsectors_read; u8 data_buffer; void operate(u8 opcode, u8 sector_size, u8 track, u8 sector, u8 head, u8 drive, u8* buffer, u8* status, u8* sectors_read) { asm volatile("mov %3, %%ah;\n" "mov %4, %%al;\n" "mov %5, %%ch;\n" "mov %6, %%cl;\n"

string comparison in 8086

Deadly 提交于 2020-06-17 03:36:08
问题 I have problem with this question. I don't know what it wants from me. Question : Write a procedure that compares a source string at DS:SI to a destination string at ES:DI and sets the flags accordingly. If the source is less than the destination, carry flag is set. if string are equal , the zero flag is set. if the source is greater than the destination , the zero and carry flags are both cleared. My Answer : MOV ESI , STRING1 MOV EDI, STRING2 MOV ECX, COUNT CLD REPE CMPSB Still I am not