flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > Function 47

Author
Thread Post new topic Reply to topic
vinyl



Joined: 01 Oct 2004
Posts: 1
vinyl
Could someone post a sample/commented
example code of how this works?

Where is # displayed?

in sysfunc.txt is says

ebx=print type, bl=0 (byte low?)

define "print type"

I would like select a memory location and display the byte in

decimal, hex and binary.

Thank You.
Post 01 Oct 2004, 15:13
View user's profile Send private message Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing
ebx = print type, bl=0 -> ecx is number
bl=1 -> ecx is pointer
bh=0 -> display decimal
bh=1 -> display hexadecimal
bh=2 -> display binary
bits 16-21 = number of digits to display (0-32)
bits 22-31 = reserved

print type consists of two words bh and bl
bh bl
[0000000000000000] [0000000000000000]
^bits 16-32 are here^you must sut BOTH the bh and bl to
the values specified above to display a number.
if bl = 0 the ecx it assume that the data to display is IN ecx.
if bl = 1 it assume the number to display is at [ecx]
bh =0,1,2 makes the kernal print out differnent versions of ecx

example of ebx to print 4 digits of a decimal number stored in ecx
bh bl
[0000000000000100] [0000000000000000]

Wishing
Post 01 Oct 2004, 18:04
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
bloglite



Joined: 21 Feb 2004
Posts: 109
Location: East Tennessee U.S.A.
bloglite
Hi,

I think we should put a html together with the sysfuncs and a linked example to a sample of well commented ASM showing the use of that function with it's options. Once we gather all the code put it together as a unitary program so you can see the use of each function.

Pick a function and submit your sample code.

Remember to use only what is needed to show the function w /all it's options.

send examples to: MenuetUSA@yahoo.com

This will help everyone trying to learn and reduce questions about the sysfuncs.

Thanks for the help, Mark & Matt (GridWorks)
Post 02 Oct 2004, 02:57
View user's profile Send private message Visit poster's website 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 can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.