2022-08-30 09:40:53 <RickCarlino[m]> crc: General question: How would you implement something like double:sip
without the use of inline assembly?
2022-08-30 09:42:43 <RickCarlino[m]> I tried: :double:sip dup-pairs push push call pop pop ;
but am having unexpected results. I can post a snippet if needed. For reference, this is happening within compiled words rather than from the interpreter.
2022-08-30 09:43:18 <RickCarlino[m]> *dup-pair, sorry. Please consider that snippet pseudo code. It is used in a context that is too large to past into IRC
2022-08-30 09:57:20 assuming (mnq-mn) as a stack signature, you'd need to use &dup-pair dip
, then rot rot
before pushing the cells.
2022-08-30 09:57:37 so something like this should work:
2022-08-30 09:57:48 :double:dip (mnq-mn) rot rot push push call pop pop ;
2022-08-30 09:57:48 :double:sip (mnq-mn) &dup-pair dip double:dip ;
2022-08-30 11:18:21 script:current-line-text
has been added to get the text of the current line. This is only useful for files, since keyboard input is purely token based.
2022-08-30 21:33:39 <RickCarlino[m]> Thanks so much for the updates crc double:sip
is particularly useful for what I am working on.
2022-08-30 21:34:09 <RickCarlino[m]> I did notice that mem:fetch-double
was added, but mem:store-double
was not. Was there a reason it was not included?
2022-08-30 21:34:21 <RickCarlino[m]> My current project uses :mem:store-double (aann-nn) push push dup-pair #1 mem:cell+ pop mem:store pop mem:store ;
2022-08-30 22:07:16 The lack of a mem:store-double was an oversight on my part. I’ve added your definition for this now
application/octet-stream
This content has been proxied by September (ba2dc).