Seriously, if your really had some programming skills you'd have figured this by now. And then asking us to write your code.

See my earlier post about some BIOSes trashing your registers...GhostXoPCorp wrote: with Hello it prints <"||pk"
with hello = h
it will print h only
can you modify my code a littlebit to help me please?
Code: Select all
org 100h
use16
mov si, hello
call print
cli
jmp $
print:
; This code assumes that DS:SI is pointing to a NULL terminated string
push ax ; Save AX in case changing it will mess up anything
mov ah, 0x0E ; Set AH to 0x0E, because we will be using teletype output
@@: ; The main loop
lodsb ; Load the next byte from DS:SI into AL and update SI
cmp al, 0x00 ; Is is NULL (Have we reached the end of the string)?
je @f ; YES? Then exit the loop
int 0x10 ; NO? Then print it using BIOS function 0x10 AH=0x0E
jmp @r ; Continue in our loop
@@: ; Leaving the main loop
pop ax ; Restore AX, because we pushed it to the stack earlier
ret ; Return to the calling code
hello db 'Hello',0
Code: Select all
org 100h
use16
hello db 'Hello',0
Code: Select all
dec ax
db 65h
insb
insb
outsw
-----
print:
; This code assumes that DS:SI is pointing to a NULL terminated string
push ax ; Save AX in case changing it will mess up anything
mov ah, 0x0E ; Set AH to 0x0E, because we will be using teletype output
@@: ; The main loop
lodsb ; Load the next byte from DS:SI into AL and update SI
cmp al, 0x00 ; Is is NULL (Have we reached the end of the string)?
je @f ; YES? Then exit the loop
int 0x10 ; NO? Then print it using BIOS function 0x10 AH=0x0E
jmp @r ; Continue in our loop
@@: ; Leaving the main loop
pop ax ; Restore AX, because we pushed it to the stack earlier
ret ; Return to the calling code
mov si, hello
call print
Code: Select all
org 100h
use16
jmp start
Believe it or not, what I said wasn't really intended to be in jest. What I attempted to do, poorly, is illustrate what you are saying in a way that you may relate to. Everyone on this forum has had to learn, and an important part of learning programming is learning how to read manuals and books on your own. Asking for help from someone who has taken the time to read the manuals, without bothering to do so yourself is one of the worst sins a programmer can commit.oh i see, your one of those people who find even a little bit in a persons conversation, and make fun of it, you have too much time on your hand, tell me do you live with your mom?
You should read the "Forum Rules" at the top of this board, the third rule of this board is: "Meet the intellectual requirements; We are not to babysit new programmers. Operating system development requires academic thinking and a big deal of knowledge. If you don't have the required knowledge then you should better find a more suitable place to practice."osdev was made for people who needed help, not for people who have nothing else to do but put retarded things and smart off to people who have just started programming in assembly.
The forum rules explicitly say that OS development is not for newcomers. The forum rules explictly mention a series of things you are required to know.GhostXoPCorp wrote:osdev was made for people who needed help, not for people who have nothing else to do but put retarded things and smart off to people who have just started programming in assembly.