Diff for /gforth/arch/misc/asm.fs between versions 1.3 and 1.6

version 1.3, 1998/05/02 21:28:57 version 1.6, 2004/01/05 22:25:01
Line 1 Line 1
 \ PIE MISC assembler  \ PIE MISC assembler
   
   \ Copyright (C) 1998,2000,2003 Free Software Foundation, Inc.
   
   \ This file is part of Gforth.
   
   \ Gforth is free software; you can redistribute it and/or
   \ modify it under the terms of the GNU General Public License
   \ as published by the Free Software Foundation; either version 2
   \ of the License, or (at your option) any later version.
   
   \ This program is distributed in the hope that it will be useful,
   \ but WITHOUT ANY WARRANTY; without even the implied warranty of
   \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   \ GNU General Public License for more details.
   
   \ You should have received a copy of the GNU General Public License
   \ along with this program; if not, write to the Free Software
   \ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
   
 Vocabulary assembler  Vocabulary assembler
 also assembler also definitions forth  also assembler also definitions forth
   \ [IFUNDEF] cross
   \ : X ;
   \ [THEN]
   
 \ sources  \ sources
   
Line 22  $7 Constant *ACCU Line 43  $7 Constant *ACCU
 $C Constant XOR         $D Constant OR  $C Constant XOR         $D Constant OR
 $E Constant AND         $F Constant SHR  $E Constant AND         $F Constant SHR
   
 $FFFC Constant tx  $FFFC Constant txd
   $FFFF Constant rx?
   $FFFE Constant rxd
 \ $FFF0 Constant tx  \ $FFF0 Constant tx
   
 : end-label previous ;  : end-label previous ;
   
 Create marks $10 cells allot  Create marks $10 cells allot
   
 : ahere s" here" evaluate 2/ ;  : ahere X here 2/ ;
   
 : m ( n -- ) cells marks + ahere 2* swap ! 0 ;  : m ( n -- ) cells marks + ahere 2* swap ! 0 ;
 : r ( n -- ) cells marks + @ ahere swap s" !" evaluate 0 ;  : r ( n -- ) cells marks + @ ahere swap s" !" evaluate 0 ;
Line 51  Create marks $10 cells allot Line 74  Create marks $10 cells allot
          r> $10 /string 0 max rot $10 + -rot           r> $10 /string 0 max rot $10 + -rot
   REPEAT  drop 2drop ;    REPEAT  drop 2drop ;
   
 : sym base @ >r hex  \ : sym 
     cr ." sym:s/PC=" ahere 4 0.r ." /" bl word count type ." /g" cr  \    base @ >r hex
     r> base ! ;  \    cr ." sym:s/PC=" ahere 4 0.r ." /" bl word count type ." /g" cr
   \    r> base ! ;
   : sym bl word drop ;
   
   : label 
     >in @ bl word count X here symentry >in !
     ahere Constant ;
   
 : label ahere Constant ;  : code
     -1 ABORT" Need end-code or end-label before a new code definition" ;
   
 also forth definitions  also forth definitions
   
Line 65  also forth definitions Line 95  also forth definitions
 : (end-code) previous ;  : (end-code) previous ;
   
 previous previous previous  previous previous previous
   

Removed from v.1.3  
changed lines
  Added in v.1.6


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