Boot Sector

I'm using asm112 to write a program to floppy boot sector.

Here's the code

        mov     ax,07c0
        mov     ds,ax
        xor     bx,bx
        mov     ah,0e
        mov     si,offset(string)
@1      lodsb
        cmp     al,00
        je      @2
        int     10
        jmps    @1
@2      xor     ah,ah
        int     16
        callf   ffff:0000

string  db      'Sorry, this disk is not bootable.' 0a 0d
        db      'Please insert another disk and press any key to reboot.' 0a 0d 00


THIS works fine. However i want to create it myself in DEBUG. Heres what i'm doing

f 0000 ffff 00; fill address range in debug.
r cx: 01ff;
w 0 0 0 1; write blank address range to floppy boot sec

a0000; start assembling at offset 0000
 
   mov ax,07c0
   mov ds,ax
   mov es,ax
   mov cs,ax
   mov ss,ax
  db 'Hello World $'
   mov ah,09
   mov dx,offset for db
   int 21
   int 20
finished

rcx: 01ff
w 0 0 0 1

then i clear memory again and reload the floppy boot sector to make sure it
is written.

However when i start the computer with the floppy i get nothing.

Any suggestions. I have tried various things and even used jmp from first address to 003e. and started my code there but no joy still.

PS. I'd offer more points if only i had them.
LVL 1
Newt6398Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aib_42Commented:
I'm not familiar with your method of writing to the floppy boot sector. Are you sure it is doing its job properly?
0
Newt6398Author Commented:
Not 100% put i do recall doing it in this way a year or so ago and it worked fine. I'm just missing something crutial. But i cannot remember.
0
pratap_rCommented:
Nett6398, theres nothing wrong with writing to the floppy that way.. one point, int 21h is a dos function call and wont be present at boot time ;-) may you should use int 10h

Have Fun!
Pratap
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Assembly

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.