Discussions related to using the integrated assembler
Ric
Posts: 208 Joined: Tue 17 Apr 2018, 21:03
Post
by Ric » Sat 21 Jun 2025, 20:16
Could someone please explain why this doesnt work, when converting this
Code: Select all
SYS DevCon.UpdateSubresource%, DevCon%, CBMenu2D%, 0, 0, CBMenu2D{}, 0, 0
into this
Code: Select all
push 0
push 0
push DWORD [^CBMenu2D{}]
push 0
push 0
push DWORD [^CBMenu2D%]
push DWORD [^DevCon%]
CALL DWORD [^DevCon.UpdateSubresource%]
Thanks in advance
Kind Regards Ric.
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
Richard Russell
Posts: 366 Joined: Tue 18 Jun 2024, 09:32
Post
by Richard Russell » Sat 21 Jun 2025, 21:08
Ric wrote: ↑ Sat 21 Jun 2025, 20:16
Could someone please explain why this doesn't work
Since
CBMenu2D{} is a
vector , not
scalar , object shouldn't you be passing it as:
or if you prefer:
The indirection you are using in your original code definitely doesn't look right to me.
Incidentally the x86-32 CPU can only push 32-bit values, making the DWORD qualifiers superfluous I would expect.
Ric
Posts: 208 Joined: Tue 17 Apr 2018, 21:03
Post
by Ric » Sat 21 Jun 2025, 22:18
Thanks Richard, I'll try in the morning
Kind Regards Ric.
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
Ric
Posts: 208 Joined: Tue 17 Apr 2018, 21:03
Post
by Ric » Sun 22 Jun 2025, 21:59
Thanks Richard, it worked a charm.
To which piece of code are you refering to when you say
The indirection you are using in your original code definitely doesn't look right to me.
Kind Regards Ric.
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
Richard Russell
Posts: 366 Joined: Tue 18 Jun 2024, 09:32
Post
by Richard Russell » Mon 23 Jun 2025, 08:08
Ric wrote: ↑ Sun 22 Jun 2025, 21:59
To which piece of code are you referring to when you say
The indirection you are using in your original code definitely doesn't look right to me.
The code you have now changed: