![]() |
Forum Index : Microcontroller and PC projects : CMM2: Bug with MEMORY SET of user failure ?
Author | Message | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
What do we think of this one ? > 480MHz Colour Maximite 2 G2 MMBasic Version 5.07.01 Copyright 2011-2021 Geoff Graham Copyright 2016-2021 Peter Mather > list "memory_set_short_test.bas" Option Base 0 Dim buf%(31) ' 256 bytes Dim addr% = Peek(VarAddr buf%()) Memory Set Short addr% + 2, &hABCD, 4 Print "&h" Hex$(Peek(Short addr% + 0), 4) " should be &h0000" Print "&h" Hex$(Peek(Short addr% + 2), 4) " should be &hABCD" Print "&h" Hex$(Peek(Short addr% + 4), 4) " should be &hABCD" Print "&h" Hex$(Peek(Short addr% + 6), 4) " should be &hABCD" Print "&h" Hex$(Peek(Short addr% + 8), 4) " should be &hABCD" Print "&h" Hex$(Peek(Short addr% + 10), 4) " should be &h0000" > run "memory_set_short_test.bas" &h0000 should be &h0000 &hABCD should be &hABCD &hCDCD should be &hABCD &h00CD should be &hABCD &h0000 should be &hABCD &h0000 should be &h0000 Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
Will look tomorrow |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
Have fixed the code ready for next release. Obviously the code isn't relevant to your port as it uses the ARM assembler routines to do things that memset can't do. Thanks for the report |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Thanks, it already works in MMB4L (assuming the expected behaviour I described above was correct), I only noticed the issue when I ran the new unit-tests on the CMM2. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |