flat assembler
Message board for the users of flat assembler.

Index > Linux > screen control and a very old post

Author
Thread Post new topic Reply to topic
MajorDill



Joined: 01 Nov 2010
Posts: 22
MajorDill 27 Jan 2015, 16:55
I was looking thru old posts and found the one about using escape sequences (instead of ncurses) to control the screen. When I tried to compile the example code I get:

clear_screen: db ESC,"[2J"
error: undefined symbol 'ESC'

the man pages on control_code does not seem to shed any light on my problem.

Any help?

the old post is "Terminals and escape sequences" (not sure how to link it)
Post 27 Jan 2015, 16:55
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 27 Jan 2015, 16:57
Code:
ESC=27    
Post 27 Jan 2015, 16:57
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
gens



Joined: 18 Feb 2013
Posts: 161
gens 27 Jan 2015, 18:05
a list of escape codes for a "normal" terminal
http://www.climagic.org/mirrors/VT100_Escape_Codes.html

ESC is in man ascii
Post 27 Jan 2015, 18:05
View user's profile Send private message Reply with quote
Rem-



Joined: 29 Mar 2013
Posts: 11
Location: Canada
Rem- 28 Jan 2015, 05:58
It's the first time I use FASM and this code works well! Smile
Code:
----------------------[clear_screen]------------------------------------

ESC equ 1bh
clear_screen: db ESC,"[2J"  ; screen clearing sequence
clear_screenSize = $-clear_screen
------------------------------------------------------------------------


----------------------[clear_screen2]-----------------------------------

clear_screen2: db 1bh,"[2J"  ; screen clearing sequence
clear_screenSize2 = $-clear_screen2
------------------------------------------------------------------------


---------------------[cursor_position]----------------------------------

cursor_position: db 1bh,"[5;1HMy message is here",10   ; row 5, column 1
cursor_positionSize = $-cursor_position
------------------------------------------------------------------------


-----------------------[text_color]-------------------------------------

text_color db 1bh,"[0;31;40mHello world!",10  ; red color
text_colorSize = $-text_color
------------------------------------------------------------------------
    

More info here --> http://bogdro.ciki.me/linux/tryb_txt_linux_en.html
Post 28 Jan 2015, 05:58
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 215
Location: Budapest, Hungary
Endre 28 Jan 2015, 09:13
The link
Post 28 Jan 2015, 09:13
View user's profile Send private message Reply with quote
MajorDill



Joined: 01 Nov 2010
Posts: 22
MajorDill 29 Jan 2015, 06:10
that got it...thanks
Post 29 Jan 2015, 06:10
View user's profile Send private message 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 cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.