OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 16, 2021 1:22 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: FAT16 bootloader
PostPosted: Mon Apr 19, 2021 1:30 am 
Offline
User avatar

Joined: Thu Jun 16, 2016 9:35 am
Posts: 24
MichaelPetch wrote:
Your DAP has moved. The bytes you are displaying no longer represent where your DAP now resides. I assume it has moved because you have made modifications to the code and data shifting the location.


You are 100% right, I didn't take into account the alignment:
Code:
0x0000000000007d30 <bogus+       0>:    0x10    0x00    0x01    0x00    0x00    0x06    0x00    0x00
0x0000000000007d38 <bogus+       8>:    0x2c    0x00    0x00    0x00    0x00    0x00    0x00    0x00


Registers:
Code:
rax: 00000000_0000422c
rbx: 00000000_00000600
rcx: 00000000_00090001
rdx: 00000000_00000080
rsp: 00000000_0000ffec
rbp: 00000000_00000000
rsi: 00000000_000e7d30
rdi: 00000000_0000ffac
r8 : 00000000_00000000
r9 : 00000000_00000000
r10: 00000000_00000000
r11: 00000000_00000000
r12: 00000000_00000000
r13: 00000000_00000000
r14: 00000000_00000000
r15: 00000000_00000000
rip: 00000000_00007cf5
eflags 0x00000202: id vip vif ac vm rf nt IOPL=0 of df IF tf sf zf af pf cf


This is right before the first int13 call

EDIT:
After using bochs debugger to see if the sector was copied on memory, after dissecting 0x600 i can find STAGE2 ����������iY“R� ��� which matches the sector on the hdd file where the file resides, so my next guess is that after verifying the file exists, I might have overstated some things and it's very possible that the formulas I use are wrong and the file load doesn't work due to that? (I've checked the real destination of STAGE2 on-memory and it appears blank [Should contain FA F4 "cli; hlt])


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group