You say “boot straight into windows”, so I assume that you are using a physical PC. In the future, pay attention: always use the emulator for development! It is just easier. I like Bochs for OSDeving because it has good debugging features. Now, for a possible solution.
There are many BIOS errors that violate the unofficial IBM PC specifications for the 0x7C00 boot address.
This can lead to a lot of problems with memory addresses and with every collection. So make a start like this:
[BITS 16] ;tell the assembler that its a 16 bit code
[ORG 0x7C00] ;this tells the assembler where the code will be loaded at when it runs on your machine. It uses this to compute the absolute addresses of labels and such.
jmp word 0:flush ;
;
flush: ;
mov BP,0 ;
mov DS,BP ;
mov ES,BP ;
;
, - 0x07C0:0000 ( ) 0x0000:7C00. , . "" , ( , , . )
jmp word 0:0x7C04 ;
...
, .
. , ?
, :
mov ax,[mydata]
hlt
mydata: dw 500 ;
-
mov ax,[0x7C06]
, , , ? , , DS 0x7C0? 0:0x7C06 0x7C0:0x7C06, .
, . , , .