hello, im sorry for making question about the same basic things. anyway, i've done a simple bootloader who loads the 2nd sector from the floppy(int 0x13), puts it at some address and jumps to it. Now, the problem im having is that if i choose to place the code and jmp to it at for example at 500h:000h and the src of that code look something like this for example:
org 0x500
section .text
mov ax,0x500
mov dx,ax
[bla bla]
foo db 'yo!',0
if i want to print foo to the screen using lodsb in a loop the only way i can do is moving foo-$$ to si .
is this the right way to do it?. I mean, it works but if the ds is diferent from 0000 (which is something a lot of examples takes advantage of, i know) is there a better way to do it?
sorry if its way to dumb to ask, but as i said all the examples jump to 0x000:xxxxx so the address of that string is pretty obvious. With my example foo will have the value 5xx and lodsb will try to get 500:5xx which is wrong since i want 500:0xx.
thanks!