From: Jos v.d.V. <jo...@us...> - 2011-12-18 14:26:06
|
Update of /cvsroot/win32forth/win32forth/src/lib/fmacro In directory vz-cvs-4.sog:/tmp/cvs-serv25774 Modified Files: FMACRO.F Log Message: Jos: addr@+ addr@< faddr@ faddr! are now also able to use the user-area Index: FMACRO.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/fmacro/FMACRO.F,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FMACRO.F 14 Dec 2011 13:47:01 -0000 1.4 --- FMACRO.F 18 Dec 2011 14:26:03 -0000 1.5 *************** *** 132,136 **** 2. Words like: addr@+ addr@< faddr@ faddr! are used during COMPILE-time. They put an address in your code that will be used in runtime. ! 3. The word ADDR enables you to get an address on the stack in runtime. --- 132,136 ---- 2. Words like: addr@+ addr@< faddr@ faddr! are used during COMPILE-time. They put an address in your code that will be used in runtime. ! 3. The word ADDR enables you to get an address on the stack in runtime when not in the user-area. *************** *** 172,175 **** --- 172,176 ---- the user-area is handled by EDX so you should not use the local B when you are using the user-area. + December 18th, 2011 addr@+ addr@< faddr@ faddr! are now also able to use the user-area )) *************** *** 785,789 **** : addr@+ ( n name-addr - n+value ) ! [ also forth ] $03 code-c, $9F code-c, code-, [ previous ] a;; --- 786,793 ---- : addr@+ ( n name-addr - n+value ) ! user? ! if [ also forth ] $03 code-c, $9A code-c, TCB - code-, [ previous ] ! else [ also forth ] $03 code-c, $9F code-c, code-, [ previous ] ! then a;; *************** *** 797,812 **** : addr@ ( name-addr - value ) ! [ also forth ] $53 code-c, $8B code-c, $9F code-c, code-, [ previous ] a;; : addr! ( name-addr - value ) ! [ also forth ] $89 code-c, $9F code-c, code-, $5B code-c, [ previous ] a;; : 0= ( n1 -- f1 ) \ return true if n1 equals zero sub ebx, # 1 sbb ebx, ebx ! a;; : if \ compiletime: ( - adr-to-jmp-part1 ) --- 801,828 ---- : addr@ ( name-addr - value ) ! user? ! if [ also forth ] $53 code-c, $8B code-c, $9A code-c, TCB - code-, [ previous ] ! else [ also forth ] $53 code-c, $8B code-c, $9F code-c, code-, [ previous ] ! then a;; : addr! ( name-addr - value ) ! user? ! if [ also forth ] $89 code-c, $9A code-c, TCB - code-, $5B code-c, [ previous ] ! else [ also forth ] $89 code-c, $9F code-c, code-, $5B code-c, [ previous ] ! then a;; + : addr@< ( addr -- flag ) + user? + if [ also forth ] $3B code-c, $9A code-c, TCB - code-, $C7 code-c, $C3 code-c, 0 code-, $1B code-c, $DB code-c, [ previous ] + else [ also forth ] $3B code-c, $9F code-c, code-, $C7 code-c, $C3 code-c, 0 code-, $1B code-c, $DB code-c, [ previous ] + then + a;; : 0= ( n1 -- f1 ) \ return true if n1 equals zero sub ebx, # 1 sbb ebx, ebx ! a;; : if \ compiletime: ( - adr-to-jmp-part1 ) *************** *** 892,899 **** : dfloat+ ( addr1 -- addr2 ) 8 ass-lit + a;; - : addr@< ( addr -- flag ) - [ also forth ] $3B code-c, $9F code-c, code-, $C7 code-c, $C3 code-c, 0 code-, $1B code-c, $DB code-c, - [ previous ] - a;; : < ( n1 n2 -- f1 ) --- 908,911 ---- *************** *** 1009,1018 **** \ needs profiler.f ! B/FLOAT newuser t1 ! \ fvariable t1 fvariable t2 fvariable t3 ! 99e t1 f! 20001e t2 f! --- 1021,1030 ---- \ needs profiler.f ! \ B/FLOAT newuser t1 ! fvariable t1 fvariable t2 fvariable t3 ! 99 t1 ! 20001e t2 f! *************** *** 1020,1032 **** code BM ! t1 faddr@ ! t1 faddr@+ ! t1 faddr! next, end-code see t1 ! see bm ! : x11 9e bm t1 f@ f. ; cr x11 .s --- 1032,1044 ---- code BM ! addr t1 ! \ t1 faddr@+ ! \ t1 faddr! next, end-code see t1 ! see bm ! : x11 3 bm @ .s ; cr x11 .s |