2 Replies - 365 Views - Last Post: 19 April 2019 - 03:49 AM

#1 Cambalinho   User is offline

  • D.I.C Addict

Reputation: 2
  • View blog
  • Posts: 783
  • Joined: 04-March 12

GCC Asm: how change the cursor\carret position?

Posted 18 April 2019 - 02:29 PM

(i'm using the GCC asm function.... or isn't ANSI too?)
how can i change the carret\cursor position on Console?
asm ("mov  %dl, 18\n\t"
    "mov  %dh, 2"
    );

i use the 'dl' and 'dh', but i get a memory leak(the program stops responding)... or i miss something or i'm doing wrong
Is This A Good Question/Topic? 0
  • +

Replies To: GCC Asm: how change the cursor\carret position?

#2 Salem_c   User is online

  • void main'ers are DOOMED
  • member icon

Reputation: 2389
  • View blog
  • Posts: 4,523
  • Joined: 30-May 10

Re: GCC Asm: how change the cursor\carret position?

Posted 18 April 2019 - 10:54 PM

You need to learn how to do it properly in a high level language first.
https://www.dreaminc...toxy-and-others

Simply messing about with registers in some ad-hoc way isn't going to work.
Was This Post Helpful? 1
  • +
  • -

#3 Cambalinho   User is offline

  • D.I.C Addict

Reputation: 2
  • View blog
  • Posts: 783
  • Joined: 04-March 12

Re: GCC Asm: how change the cursor\carret position?

Posted 19 April 2019 - 03:49 AM

you have right, but where is the documentation for Windows?
and there must be for Linux too.
even the line 'int 10h' isn't compatible with GCC\GNU compiler
i know that the Assembler tutorials are very less... i even don't know if they can be compatible with Linux(even just some lines)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1