Date: Sat, 21 May 2005 00:47:26 +0200 From: alexander <arundel@h3c.de> To: freebsd-hackers@freebsd.org Subject: Looking for ANSI/VT100 code replacement. Message-ID: <20050520224726.GA7951@skatecity>
next in thread | raw e-mail | index | archive | help
I'd like to port an application that was written in x86 assembly for Linux. So far all I had to do is change the Linux calling convention (registers) to Posix style (stack). However at one point this application outputs 5 characters to stdout (using syscall write and fd=1). These 5 characters however are then being deleted and overwritten again. The application uses VT100 codes to do this. First it moves the cursor to the left 5 times then it deletes everything from the end of the line to the current cursor position. However this slows down the whole application. That's why I'd like to replace that code with something faster. I've tried using lseek in combination with the fd=1 (stdout) and a negative byte offset, but that didn't really work. Is there a way to do this by only using syscalls? Under C/C++ I'd use fprintf or ncurses, but I'd like to limit the application to pure assembly language and a few syscalls. Cheers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050520224726.GA7951>