kolibrios/programs/develop/SPForth/src/spf_defkern.f
Kirill Lipatov (Leency) 09488af869 KolSPForth12 uploaded to SVN
git-svn-id: svn://kolibrios.org@4867 a494cfbc-eb01-0410-851d-a64ba20cac60
2014-04-21 19:22:58 +00:00

115 lines
2.0 KiB
Forth
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

( <EFBFBD>à®æ¥¤ãàë ¢à¥¬¥­¨ ¢ë¯®«­¥­¨ï ¤«ï CONSTANT, VARIABLE, etc.
Ž‘-­¥§ ¢¨á¨¬ë¥ á«®¢ .
Copyright [C] 1992-1999 A.Cherezov ac@forth.org
<EFBFBD>८¡à §®¢ ­¨¥ ¨§ 16 §à來®£® ¢ 32 §àï¤­ë© ª®¤ - 1995-96££
<EFBFBD>¥¢¨§¨ï - ᥭâï¡àì 1999
Œ®¤¨ä¨æ¨à®¢ ­­® Œ ªá¨¬®¢ë¬ Œ.Ž.
email:mak@mail.rtc.neva.ru
http://informer.rtc.neva.ru/
â ¤ {812}105-92-03
â à {812}552-47-64
)
Code _CREATE-CODE
SUB EBP, 4
MOV [EBP] , EAX
POP EAX
RET
EndCode
Code _CONSTANT-CODE
SUB EBP , 4
MOV [EBP] , EAX
POP EAX
MOV EAX, [EAX]
RET
EndCode
Code _USER-CODE
SUB EBP, 4
MOV [EBP], EAX
POP EAX
MOV EAX, [EAX]
ADD EAX, EDI
RET
EndCode
Code USER+ ;( offs -- addr )
ADD EAX, EDI
RET
EndCode
Code _USER-VALUE-CODE
SUB EBP , 4
MOV [EBP] , EAX
POP EAX
MOV EAX, [EAX]
ADD EAX, EDI
MOV EAX, [EAX]
RET
EndCode
Code _USER-VECT-CODE
POP EBX
MOV EBX, [EBX]
LEA EBX, [EDI+EBX]
MOV EBX, [EBX]
JMP EBX
RET
EndCode
Code _VECT-CODE
POP EBX
JMP [EBX]
EndCode
Code _TOVALUE-CODE
POP EBX
SUB EBX, 9
MOV [EBX] , EAX
MOV EAX, [EBP]
ADD EBP, 4
RET
EndCode
Code _TOUSER-VALUE-CODE
POP EBX
SUB EBX, 9
MOV EBX, [EBX] ; ᬥ饭¨¥ user-¯¥à¥¬¥­­®©
ADD EBX, EDI
MOV [EBX] , EAX
MOV EAX, [EBP]
ADD EBP, 4
RET
EndCode
Code _SLITERAL-CODE
SUB EBP, 8
MOV [EBP+4], EAX
POP EBX
MOVZX EAX, BYTE PTR [EBX]
INC EBX
MOV [EBP], EBX
ADD EBX, EAX
; INC EBX
JMP EBX
EndCode
Code _CLITERAL-CODE
SUB EBP, 4
MOV [EBP] , EAX
POP EAX
MOVZX EBX, BYTE PTR [EAX]
LEA EBX, [EAX+EBX+1]
JMP EBX
EndCode
\EOF
' _CLITERAL-CODE VALUE CLITERAL-CODE
' _CREATE-CODE VALUE CREATE-CODE
' _USER-CODE VALUE USER-CODE
' _CONSTANT-CODE VALUE CONSTANT-CODE
' _TOVALUE-CODE VALUE TOVALUE-CODE