[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/boot/forth/screen.4th

Version: -  FREEBSD  -  FREEBSD7  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  OPENSOLARIS  -  minix-3-1-1  -  TRUSTEDBSD-SEBSD  -  FREEBSD-LIBC  -  FREEBSD7-LIBC  -  FREEBSD6-LIBC  -  GLIBC27 
SearchContext: -  none  -  excerpts  -  bigexcerpts 

  1 \ Screen manipulation related words.
  2 \ $FreeBSD: src/sys/boot/forth/screen.4th,v 1.1 2003/05/30 09:29:23 scottl Exp $
  3 
  4 marker task-screen.4th
  5 
  6 : escc  ( -- )  \ emit Esc-[
  7         91 27 emit emit
  8 ;
  9 
 10 : ho    ( -- )  \ Home cursor
 11         escc 72 emit    \ Esc-[H
 12 ;
 13 
 14 : cld   ( -- )  \ Clear from current position to end of display
 15         escc 74 emit    \ Esc-[J
 16 ;
 17 
 18 : clear ( -- )  \ clear screen
 19         ho cld
 20 ;
 21 
 22 : at-xy ( x y -- )      \ move cursor to x rows, y cols (1-based coords)
 23         escc .# 59 emit .# 72 emit      \ Esc-[%d;%dH
 24 ;
 25 
 26 : fg    ( x -- )        \ Set foreground color
 27         escc 3 .# .# 109 emit   \ Esc-[3%dm
 28 ;
 29 
 30 : bg    ( x -- )        \ Set background color
 31         escc 4 .# .# 109 emit   \ Esc-[4%dm
 32 ;
 33 
 34 : me    ( -- )  \ Mode end (clear attributes)
 35         escc 109 emit
 36 ;

Cache object: 3c342e317e3cf29fe5daa54ea9d0cf05


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.