Annotation of gforth/ec/dotx.fs, revision 1.8

1.3       jwilke      1: \ dotx.fs a always (simple) hexadecimal .s
1.1       pazsan      2: 
1.8     ! anton       3: \ Copyright (C) 1998,2000,2003,2007 Free Software Foundation, Inc.
1.2       anton       4: 
                      5: \ This file is part of Gforth.
                      6: 
                      7: \ Gforth is free software; you can redistribute it and/or
                      8: \ modify it under the terms of the GNU General Public License
1.7       anton       9: \ as published by the Free Software Foundation, either version 3
1.2       anton      10: \ of the License, or (at your option) any later version.
                     11: 
                     12: \ This program is distributed in the hope that it will be useful,
                     13: \ but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14: \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     15: \ GNU General Public License for more details.
                     16: 
                     17: \ You should have received a copy of the GNU General Public License
1.7       anton      18: \ along with this program. If not, see http://www.gnu.org/licenses/.
1.1       pazsan     19: 
1.3       jwilke     20: 
                     21: 
                     22: \ this is much simpler than the things needed for . and .s
                     23: \ so if you are debugging primitives and you don't get .s
                     24: \ to work use this version.
1.1       pazsan     25: 
                     26: [IFUNDEF] 8>>
                     27: : 8>> 8 rshift ;
                     28: [THEN]
                     29: 
                     30: : .digit
                     31:   $0f and
                     32:    dup 9 u>
                     33:    IF   
                     34:         [ char A char 9 - 1- ] Literal +
                     35:    THEN 
1.3       jwilke     36:   [char] 0 + (emit) ;
1.1       pazsan     37: 
                     38: : .w
                     39:        dup 8>> 2/ 2/ 2/ 2/ .digit
                     40:        dup 8>> .digit
                     41:        dup 2/ 2/ 2/ 2/ .digit
                     42:        .digit ;
                     43: 
                     44: : .x   
                     45:        dup 8>> 8>> .w .w $20 (emit) ;
                     46: 
                     47: : .sx
                     48:   depth
1.3       jwilke     49:   dup [char] < emit .x [char] > emit dup
1.1       pazsan     50:   0 ?DO dup pick .x 1- LOOP drop ;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>