Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:30 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: Bug with MEMORY SET of user failure ?

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 09:08pm 07 Oct 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 10310
Posted: 09:49pm 07 Oct 2021
Copy link to clipboard 
Print this post

Will look tomorrow
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 09:07am 08 Oct 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 4311
Posted: 09:14am 08 Oct 2021
Copy link to clipboard 
Print this post

  matherp said  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


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
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025