X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=temp.asm;h=f85cb3375faff34eaea45ea027fde734c36fa31e;hb=b49fed131d5a7806d0737bdc6f9b693c64753cf2;hp=62ae251a12a52d27a475c410ffc37fe7c208d84b;hpb=41f174ae2048c812c337f38ee82bdce51dd74e9c;p=rrq%2Frrqforth.git diff --git a/temp.asm b/temp.asm index 62ae251..f85cb33 100644 --- a/temp.asm +++ b/temp.asm @@ -7,9 +7,9 @@ WORD p_objectspace,'TEMPSPACE',dovariable ;; Holds size and address of the object space. - dq 104857600 ; Total object space size (request size) - dq 0 ; Object space base address - dq 0 ; Currently used. + dq 104857600 ; [0] Total object space size (request size) + dq 0 ; [8] Object space base address + dq 0 ; [16] Currently used. WORD p_temp,'TEMP',fasm ;; ( size -- addr ) @@ -40,11 +40,12 @@ p_objecthole_from_tail: ;; ( char* n -- char* n ) ;; Capture a given [n:char*] string as a new temp object with ;; leading size cell. - dq p_dup, p_gtR ; ( -- char* n ) [ n ] - dq p_dup, p_temp ; ( -- char* n addr ) - dq p_dup, p_gtR ; ( -- char* n addr ) [ n addr ] + dq p_dup, p_gtR ; ( -- char* n ) [ n ] + dq p_dup, p_literal, 8, p_plus ; ( -- char* n n+8 ) + dq p_temp ; ( -- char* n addr ) dq p_2dup, p_put - dq p_literal, 8, p_plus - dq p_swap, p_strncpy - dq p_Rgt, p_Rgt + dq p_literal, 8, p_plus ; ( -- char* n addr+8 ) [ n ] + dq p_dup, p_gtR ; ( -- char* n addr+8 ) [ n addr+8 ] + dq p_swap, p_strncpy ; ( -- ) [ n addr+8 ] + dq p_Rgt, p_Rgt ; ( -- addr+8 n ) [ ] dq p_exit