+TheBF Posted July 12, 2022 Share Posted July 12, 2022 (edited) 5 hours ago, apersson850 said: I think Lee was referring to that the value in R4 has to be 00XX in hex. Or XX00. If you had used 199 hex in your example, it would have added 0199 to 9901, with the result 9A9A instead. Indeed. The stack diagram for FILLW ( addr len c -- ) means that the top argument is a character. I know I know. It's just a comment. Not enforced by the compiler like certain other languages that begin with the letter 'P'. That is all the warning you get to make sure the argument is less than 255. If that is troublesome you could always add runtime checking yourself. : FILLW ( addr len c -- ) DUP FF00 AND ABORT" You dummy! I told you the top argument is a character" FILLW ; Edited July 13, 2022 by TheBF Updated code: mask was reversed. 1 1 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.