Ce site fonctionne mieux avec JavaScript.
Accueil
Explorateur
lain.church
Aide
S'inscrire
Connexion
izaya
/
collapseos
miroir de
https://github.com/hsoft/collapseos.git
Suivre
1
Ajouter aux favoris
1
Bifurcation
0
Code
Tickets
0
Versions
0
Wiki
Activité
Parcourir la source
forth: Forth-ify "PC!"
pull/95/head
Virgil Dupras
il y a 4 ans
Parent
04a6784de4
révision
7beac94b5a
4 fichiers modifiés
avec
22 ajouts
et
20 suppressions
Vue séparée
Option de Diff
Voir les Statistiques
Télécharger le Fichier Patch
Télécharger le Fichier des Différences
BIN
emul/forth/z80c.bin
+1
-19
forth/forth.asm
+14
-1
forth/z80a.fs
+7
-0
forth/z80c.fs
BIN
emul/forth/z80c.bin
Voir le fichier
+ 1
- 19
forth/forth.asm
Voir le fichier
@@ -21,11 +21,6 @@
;
; PutC: Write character specified in A onto the device.
;
; *** ASCII ***
.equ BS 0x08
.equ CR 0x0d
.equ LF 0x0a
.equ DEL 0x7f
; *** Const ***
; Base of the Return Stack
.equ RS_ADDR 0xf000
@@ -738,23 +733,10 @@ PRINT:
inc hl
jr .loop
; ( c port -- )
.db "PC!"
.fill 4
.dw $-PRINT
.db 0
PSTORE:
.dw nativeWord
pop bc
pop hl
call chkPS
out (c), l
jp next
; ( port -- c )
.db "PC@"
.fill 4
.dw $-P
STORE
.dw $-PRINT
.db 0
PFETCH:
.dw nativeWord
+ 14
- 1
forth/z80a.fs
Voir le fichier
@@ -107,12 +107,25 @@
C@ ( b r op )
ROT ( r op b )
8 * ( r op b<<3 )
OR OR
Z
,
OR OR
A
,
;
0xc0 OP2br SETbr,
0x80 OP2br RESbr,
0x40 OP2br BITbr,
( cell contains both bytes. MSB is spit as-is, LSB is ORed with r )
( r -- )
: OP2r
CREATE ,
DOES>
@ 256 /MOD ( r lsb msb )
A, ( r lsb )
SWAP 8 * ( lsb r<<3 )
OR A,
;
0xed41 OP2r OUT(C)r,
0xeb40 OP2r INr(C),
( dd nn -- )
: OP3ddnn
CREATE C,
+ 7
- 0
forth/z80c.fs
Voir le fichier
@@ -83,3 +83,10 @@ CODE AND
H A LDrr,
HL PUSHqq,
;CODE
CODE PC!
BC POPqq,
HL POPqq,
chkPS,
L OUT(C)r,
;CODE
Écrire
Aperçu
Chargement…
Annuler
Enregistrer