flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > LBA28 in Long Mode not working |
Author |
|
revolution 06 Aug 2021, 07:01
The INS{B,W,D} instructions are the same encoding for 32 and 64 bit modes, the only change is the availability of RDI instead of EDI.
If the memory at 2000000 is not writeable then INSW could fault. |
|||
06 Aug 2021, 07:01 |
|
binary 06 Aug 2021, 08:12
Thank you!
The issue was in the addressing, changing it to 1000000 doesn't fault. I don't understand this part: Code: mov ecx, 256*2 How can I send the sectors to a higher memory location? |
|||
06 Aug 2021, 08:12 |
|
revolution 06 Aug 2021, 08:22
You requested 2 sectors @1f2, so you want to read 2 * 256 words = 1024 bytes.
If you want to read more data then request more sectors @1f2 and change the ecx counter to match. Code: ;... mov dx,1f2h mov al,20 ; number of sectors to read out dx,al ;... mov ecx, 256*20 ;... |
|||
06 Aug 2021, 08:22 |
|
binary 06 Aug 2021, 08:40
Changing the destination address to a higher memory location ( 4000000 ) will fault
Code: mov edi, 4000000 The memory size in the emulator is set to 128MB |
|||
06 Aug 2021, 08:40 |
|
bitRAKE 06 Aug 2021, 10:31
(It's been a long time.)
Maybe you need to enable the A20 line for the memory bus? It's disabled by default. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
06 Aug 2021, 10:31 |
|
revolution 06 Aug 2021, 14:09
You need to map more address space.
Code: mov edi,73000h ; address of first page table mov eax,0 + 111b mov ecx,256 ; number of pages to map (1 MB) |
|||
06 Aug 2021, 14:09 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.