Author Topic: Some questions  (Read 99319 times)

avcaballero

  • Guest
Some questions
« on: July 12, 2016, 09:15:05 AM »
Hello, I have playing a bit with sol-asm. I have tried to create without success a dib section, maybe I did something wrong. I attach the source if anyone may help.

Besides, there are some other things I found:

* Compiler doesn't allow to initialize a structure variable with a negative number (it says it is too big). In this case miDIBInfo.biHeight = -cdYSize

* Is there a way to get the size of a structure?

* When you use a structure variable you need first to get its location in ESI. The solasm struc reminds me a lot to nasm structs. There, we can use [stvar + stName.Field], so you can save the "mov esi, stvar"

*  Though it can be done with external links, it would be good to compile resources, as icons, etc.

I liked solasm, thank you.

bogdanontanu

  • Administrator
  • Newbie
  • *****
  • Posts: 22
    • View Profile
    • oby.ro
Re: Some questions
« Reply #1 on: July 12, 2016, 07:45:23 PM »
Hi,

 Thanks for testng sol_asm ;)

Addressing a struct without using a register should work.

Something like this:

Code: [Select]

struc point
x rd 1
y rd 1
z rd 1
ends

.data
my_point rs point,1

.code
mov [my_point.x],eax
mov [my_point.y],2
mov [my_point.z],3


Size of a structure is:

Code: [Select]
    mov eax,size point

I will check the other issues and fix them.
« Last Edit: July 12, 2016, 07:49:10 PM by bogdanontanu »