version 1.4, 2000/07/30 19:56:05
|
version 1.6, 2000/08/13 19:03:42
|
Line 1
|
Line 1
|
\ *** Assembler for the Intel i486 *** 07nov92py |
\ *** Assembler for the Intel i486 *** 07nov92py |
|
|
|
\ Copyright (C) 1992-2000 by Bernd Paysan |
|
|
|
\ Copyright (C) 2000 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., 675 Mass Ave, Cambridge, MA 02139, USA. |
\ |
\ |
\ The syntax is reverse polish. Source and destination are |
\ The syntax is reverse polish. Source and destination are |
\ reversed. Size prefixes are used instead of AX/EAX. Example: |
\ reversed. Size prefixes are used instead of AX/EAX. Example: |
Line 280 $27 bc: DAA $2F bc: DAS $37 bc:
|
Line 300 $27 bc: DAA $2F bc: DAS $37 bc:
|
: aa: Create c, |
: aa: Create c, |
DOES> ( -- ) c@ |
DOES> ( -- ) c@ |
imm# @ 0= IF &10 imm ! THEN 1 imm# ! finish ; |
imm# @ 0= IF &10 imm ! THEN 1 imm# ! finish ; |
$D4 aa: AAM $D5 aa: AAD $D7 bc: XLAT |
$D4 aa: AAM $D5 aa: AAD $D6 bc: SALC $D7 bc: XLAT |
|
|
$60 bc: PUSHA $61 bc: POPA |
$60 bc: PUSHA $61 bc: POPA |
$90 bc: NOP |
$90 bc: NOP |