You're working in 16-bit RealMode but why is your origin at 7c00h ?
lodsb is equivalent to
;16-bit
mov al,ds:[si]
inc si
;32-bit
mov al,ds:[esi]
inc esi
I don't see a problem but you are using Video Interrupt 10h, command 0Eh which ah=command, al=character. There is no color as its TTY (Raw ASCII text).
I think you're trying to write character and attribute which is command 09h
al=char
ah=command
bl=attribute
bh=page number
cx=# of times to write char.
wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
Using dd command to write to floppy disk.
Have you tried any other third party file utilities?
And did you analyze the output with a hexeditor to check if everything went right?
MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116
Are you clobberng your Segment register on purpose?
xor ax,ax ;zero out ax
mov ds,ax ;initialise data segment
mov ss,ax
this should be more like
mov ax,cs
mov ds,ax
mov ss,ax
wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
Okay then.
Does your assembler understand C defines?
mov sp, 0x7c00
0x7c00 is a C definition.
0x10
Assemblers typically are looking for 07c00h
10h
wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
You were using C definitions in the posted code.
Examine your CS register and IP register.
What are their hex values when you first begin the code?
wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
As an experiment replace your
lodsb ; AL = [DS:SI]
with
mov al,cs:[si]
inc si
It'll then force the string load from the code segment!
wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
Everything looks correct but I still think its a Segment:Offset issue.
Initialize your Graphics card Page#0 column 0, row 0. Before doing anything.
And try writing your ASCII letters directly into the text frame buffer.
mov ax,0b800h
mov es,ax
xor edi,edi
mov es:[edi],al
inc edi
inc edi
wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99