Cosmos: How to include ASSEMBLY

Created on 8 May 2017  路  12Comments  路  Source: CosmosOS/Cosmos

SO I want to include some basic assembly (int 10h, mov ax, ext.) is there a way i can do this?

Pending User Response Question

All 12 comments

You can use plugs for that. You can look at this method, which is a plug for this method.

thanks

ok I dont think you get what i mean. The purpos I need asssembly is the int 10h function (in order to move cursor, Console.SetCursorPosition is not avaliable)

On 5/8/2017 6:12 PM, Lrios4403 wrote:

ok I dont think you get what i mean. The purpos I need asssembly is the
int 10h function (in order to move cursor, Console.SetCursorPosition is
not avaliable)

What you are looking for is BIOS calls. You can't do those in 32 bit
mode, only 16 bit.

ok. Do you have another solution to move the cursor in console mode?

why the cursor does not move already?
Do you have tried to set Console.CursorVible at true?

https://msdn.microsoft.com/en-us/library/system.console.cursorvisible(v=vs.110).aspx

Ah if CursorSetPosition is a native method you should write a plug for it.
For example for CursorSize I had to modify here:
https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.System/Console.cs#L115

here:
https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.System.Plugs/System/ConsoleImpl.cs#L92

and here (the real low level implementation):
https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.HAL/TextScreen.cs#L103

Hmm I see now that indeed there is SetCursorPos already https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.HAL/TextScreen.cs#L84 this should be called when SetCursorPosition is called can you verify this?

is there a default graphics for mouse or something .. how would you move a cursor when there is no cursor or there is no graphics driver ..

capture

Are you using the last version? If you are using the UserKit is code really old!
It is plugged as you can see:
https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.System.Plugs/System/ConsoleImpl.cs#522

@KL4932 we are talking to of the graphic cursor of text cursor the '|' that you see when write text :-)

Sorry but my Linux machine is totally broken (I hope to use Cosmos one day :-)) cannot edit post anymore!

@KL4932 we are NOT talking of the graphic cursor but of text cursor the '|' that you see when write text :-)
You can do graphic cursor (and more) using CGS: https://github.com/CosmosOS/Cosmos/wiki/Cosmos-Graphic-Subsystem

alright thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seba4316 picture seba4316  路  8Comments

omerhijazi404 picture omerhijazi404  路  9Comments

erikpro007 picture erikpro007  路  4Comments

Irxori-TheBetrayed picture Irxori-TheBetrayed  路  3Comments

365Tito picture 365Tito  路  11Comments