Given the following array definition, write a constant declaration named ArraySize that automatically calculates the size in bytes, of

Given the following array definition, write a constant declaration named ArraySize that automatically calculates the size in bytes, of the array: newArray DWORD 10,20,30,40,50
a) arraysize=(S-newArray)
b) arraysize#(S-new, Array)/2
c) arraySize- (S-newArray)/4
d) arraySize- (S-arraySize)

Related Posts

This Post Has 3 Comments

  1. ArraySize = ($ - newArray)

    Explanation:

    Given

    Array name: newArray

    Type: DWORD

    Required

    The size of the array in bytes

    The following formula is used to calculate the size of an array in assembly language.

    Variable = ($-Array name)

    So, we have:

    ArraySize = ($ - newArray)

    Where ArraySize is the variable that holds the size of newArray (in bytes)

Leave a Reply

Your email address will not be published. Required fields are marked *