Three places...
; write to floppy
xor ax,ax
mov dl,0 ;is this the place to put 80h
int 0x13
jc justError
mov ah,0x09
mov dx,InitSuccess
int 0x21
loop1:
mov ah,0
mov dl,0 ;is this the place to put 80h
int 0x13
mov al,1
mov ah,3
mov cx,1
mov dx,0 ; also here!
mov bx,buffer
int 0x13
...
The drive number goes in dl, for the "reset" function (ah=0), the "read" function (ah=2), and the "write" function (ah=3) of int 13h. As I recall, bios assigns "80h" to whichever (physical) drive is booted from (as selected in "setup"). Then, the "code part" of the MBR reads the partition table and loads the "real bootsector" from the partition marked "active". This is what dos will call "drive C:". Dos assigns other drive letters to... physical drives first, then logical partitions (or is it the other way around?). In any case, if you've got multiple drives with multiple partitions, it is quite possible to become confused as to the relationship between "80h", "81h", etc. and "C:", "D:", etc. (ask me how i know!). Be careful!
Your code looks correct to me - you're making good progress... If you're working with a "test machine" that it wouldn't kill ya to lose, "go for it". If you feel the need to "be more careful", you could read the proposed .bin file into a buffer, display the partition table (at least), confirm with the user, read the drive/head/cylinder/sector that you propose to replace into a (different!) buffer, display the partition table (at least), confirm, and write the buffer to the drive... making sure that it's the same as what you displayed - maybe use a common subroutine to set up cx and dx, even? At this point, you're writing an "fdisk" clone, more or less...
Just to make sure you know, a floppy drive doesn't have an MBR. I don't know about a USB device... I would guess "no" if it's emulating a floppy, "yes" otherwise? No idea what an emulator does - whatever you tell it to, I suppose...
I don't remember, for sure, just what the attached file does... I think it just writes to a .dat file and doesn't try to write anything with int 13h, so it should be "safe" to try(?). It'll generate a number of warnings with "modern" Nasm, due to labels with no ':'. Should be okay to ignore 'em... or fix 'em. There may be something in there you can use...
Best,
Frank