Hey guys!
I'm in the process of writing a bootloader and I'm having trouble printing out memory information,
using 16 bit nasm
I know INT 12h stores the low memory information in AX but I can't seem to print it out correctly.
I'm currently trying to print it by converting to ascii, moving it into a string and printing it with INT 10h but right now I just get ASCII smiley faces.
Can I get a snippet of asm on how to print the contents of AX to the screen?
Thanks
SuperKingGT 0 Newbie Poster
Recommended Answers
Jump to Postmov ax, 6745 ;any random number xor dx,dx ;convert 16 bit number in ax into 32 bit number in dx:ax mov bx.10 ;radix div bx ;5 into dx, 674 into ax add dl, '0' ;convert to digit mov mem[4], dl ;save units column digit xor dx,ax ;dx:ax …
Jump to PostI use masm syntax, which isn't quite the same as nasm. If I remember rightly, nasm would want you to write [mem + 4] instead of mem[4].
Personally, if I was using the bios functions, I would do the print function like this. You might need to modify it for …
All 6 Replies
Assembly Guy 72 Posting Whiz
SuperKingGT 0 Newbie Poster
mathematician 0 Junior Poster
SuperKingGT 0 Newbie Poster
mathematician 0 Junior Poster
SuperKingGT 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.