flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > DOS > help me, is not loding error ,string loding

Author
Thread Post new topic Reply to topic
kerr



Joined: 24 Feb 2016
Posts: 118
help me, is not loding error ,string loding

Code:

org 0x0000
                mov     ax,0x07c0                               
                push    ax ax ax                                
                pop     ds es ss
                mov     sp,0xfffe                               
                mov     ax,0x1301                               
                mov     bx,0x02                                 
                mov     cx,28                                   
                mov     dx,0                                    
                mov     bp,welcome      
                int     0x10
                
                mov             al,loding                     ;display error, is can't loding string  system on loding.....
                mov             cx,20
                mov     bx,02
                mov     ah,0x0e
                int             0x10
                welcome         db '==== Welcome to MyOS! ====',13,10
                loding          db 'System on loding....',13,10
                times 510-($-$$db 0x90
                dw 0xaa55




_________________
I hope we will be good friends.
Post 07 Apr 2017, 08:08
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 14800
Location: Lost in translation
al is an 8-bit register. You'll need at least a 16-bit register. Try using dx.
Post 07 Apr 2017, 09:16
View user's profile Send private message Visit poster's website Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 118

revolution wrote:
al is an 8-bit register. You'll need at least a 16-bit register. Try using dx.



No

this is error!

mov dx,loding
mov ah,0x0e
int 0x10


display error.

_________________
I hope we will be good friends.
Post 07 Apr 2017, 09:45
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 14800
Location: Lost in translation
You'll need to follow the int 0x10 register expectations. I showed dx as an example. But if int 0x10 uses another register then you'll have to use that.

But whatever you do you will need a 16-bit register, and also one of the segment registers to be set correctly.
Post 07 Apr 2017, 09:52
View user's profile Send private message Visit poster's website Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 118

revolution wrote:
You'll need to follow the int 0x10 register expectations. I showed dx as an example. But if int 0x10 uses another register then you'll have to use that.

But whatever you do you will need a 16-bit register.




can you run my code?
You will find the problem.

_________________
I hope we will be good friends.
Post 07 Apr 2017, 09:54
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 368
https://en.wikipedia.org/wiki/INT_10H

On AH=0Eh it says AL is a character, and you instead pass it the address of your string.

You'll probably need a loop and use instead:

Code:
mov al, [loding]

1 character at a time.

Or use AH=13H it seems it's made for writing strings?
Post 07 Apr 2017, 11:19
View user's profile Send private message Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 118

Furs wrote:
https://en.wikipedia.org/wiki/INT_10H

On AH=0Eh it says AL is a character, and you instead pass it the address of your string.

You'll probably need a loop and use instead:

Code:
mov al, [loding]

1 character at a time.

Or use AH=13H it seems it's made for writing strings?



Oh frend...

this al,[loding] is error .
I tried .

this is my code.

Code:

                                       mov si,loding
                                          lodsb 
                                       or al,al 
                                       jz end_s
                                      mov ah,0x0e
                                     mov bx,02
                                      int 0x10





mov al,loding is error ,It is because there is no pointer

_________________
I hope we will be good friends.
Post 08 Apr 2017, 02:24
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 368
What is your code supposed to be doing? You need to put the entire int 0x10 in a loop, together with lodsb.


Code:
mov siloding
mov cx20
mov bx2
mov ah0x0e
@@:
  lodsb
  int 0x10
  cmp al10  ; check for newline (your string does NOT have null terminator)
  jnz @b

Though I've almost no experience programming with the BIOS, so can't help you more than this.

BTW it's spelled loading. Wink
Post 08 Apr 2017, 15:45
View user's profile Send private message Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 118

Furs wrote:
What is your code supposed to be doing? You need to put the entire int 0x10 in a loop, together with lodsb.


Code:
mov siloding
mov cx20
mov bx2
mov ah0x0e
@@:
  lodsb
  int 0x10
  cmp al10  ; check for newline (your string does NOT have null terminator)
  jnz @b

Though I've almost no experience programming with the BIOS, so can't help you more than this.

BTW it's spelled loading. Wink






thank you frends .
this is a good ideas.

_________________
I hope we will be good friends.
Post 13 Apr 2017, 06:36
View user's profile Send private message Reply with quote
system error



Joined: 01 Sep 2013
Posts: 477
oh keeeeerrrrrrr friend

i hope u die somewherre in your boot program before it gets to the signature. C'mon, your english is getting worse for every posts right from last year! I've improved my english so much since then. You??

kerrrr... please die! Laughing
Post 10 May 2017, 06:24
View user's profile Send private message Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 118

system error wrote:
oh keeeeerrrrrrr friend

i hope u die somewherre in your boot program before it gets to the signature. C'mon, your english is getting worse for every posts right from last year! I've improved my english so much since then. You??

kerrrr... please die! Laughing



NO
I don't think so
system error friend.
Your speak english is vary good.
but i don't think so my english is worse.
i just don't want typing.

_________________
I hope we will be good friends.
Post 10 May 2017, 07:37
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.