cancel
Showing results for 
Search instead for 
Did you mean: 

PC Processors

emilsuuri
Adept I

Is it possible that there is a bug in my Ryzen 5 1500x? Jumps and calls seem to mess things up in real mode.

I've been trying to solve a very weird problem with my bootsector that I wrote. The assembly code I wrote is supposed to output characters to the screen using interrupt 0x10.

The code works perfectly on all other x86-based computers that I have around. (It seems to work fine in QEMU, too.)

For example, this doesn't work:

mov al, 'g'

mov ah, 0x0e

int 0x10

jmp $ (Jumps to self)

But if I add this just before "jmp $", it works perfectly:

cli

hlt


Very frustrating.

0 Likes
1 Solution
emilsuuri
Adept I

SOLUTION FOUND:

Looks like the BIOS was looking for "int 13h", and now that I added it, the code works fine.

View solution in original post

0 Likes
11 Replies
emilsuuri
Adept I

UPDATE:

 It looks like it has something to do with booting from a flash drive that displays as USB FDD on the BIOS. (Mobo: MSI B440-A Pro)

0 Likes
misterj
Big Boss

emilsuuri, at this stage of the game, I doubt you have found a processor bug, but it certainly is possible.  I do not think there is expertise in this User Forum to help you.  I do certainly not understand your code segment.  I suggest you talk to AMD Online Support.  Good luck and enjoy, John.

is there a particular reason for booting into DOS

you can always run DOS in a virtual machine with virtualbox or hyper-v

0 Likes

Hardcoregames, the thing is that Im not trying to boot into DOS, Im trying program a small-OS-type-of-thing.

And my code seems to be bug-free, because it works perfectly on an another computer. (An Intel i3 laptop)

0 Likes

I have a USB floppy for BIOS recovery and updates but while it does boot DOS that is needed for some old flash tools

0 Likes
softprogram
Adept I

Ah , you are using assembly code . Intel have very careful IA 64bit assembly guide when i still in the unversity . Your code remind me of the old time .  As i can remember , each cpu family has change in register when in 32 bit to 64 bit  . Maybe you should find document clearly state about amd cpu register .  Just , it is like you are learning system programming or you are trying to produce virus ! . But i wish you are learning system programming with assembly ! .  But this is the hardware forum . Wrong place for software programmer ! . You should find your answer in stackoverflow forum . That is the place that you will find answer very easily . This is the hardware forum . Little software programmer is in here . Good weekend ! .

emilsuuri
Adept I

SOLUTION FOUND:

Looks like the BIOS was looking for "int 13h", and now that I added it, the code works fine.

0 Likes

INT 13h is the BIOS interface for the disk drive

0 Likes

int 13h is interrupt command  as the requirement before any execution of command . But very long ago nearly 10 years . Now i do not remember exactly .  This reminds me of the  time in the university with system programming .

0 Likes

Are you writing a BIOS or an operating system?

0 Likes
softprogram
Adept I

that is a subject in the program in university . System programming . Now , no one has the time to write os . Linux is perfect and stable . Even russian military weapon , russian uses linux ! . and satellites all use linux  . That is the catastrophic phenomenon if they use windows ! . A bug in windows can make satellites land on every body's  heads ! . Funny ! .  No certainly not .

     The only purpose now is to write virus . And i hope that the asker does go that way ! . 

     Ah , write bios but i am not mainboard designer now . So i have no information in order to write program for bios . That is embedded system in deed ! . Write for chipset ! . That is really embedded system ! . Thank for your asking ,  hardcoregames . Have nice weekend ! . 

0 Likes