Why Scratch and Assembly are alike

Tags
assembly lowlevel programming scratch technology 
Labels
Members allowed to view this conversation
Everyone

max

9 hours ago Administrator

Here are the reasons

  1. Assembly has a limited number of registers that can be used to hold values
    1.1. Scratch projects have a limited number of variables that can be used to hold values
  2. Assembly programs can work with a medium that can store indefinite amounts of addressable data called memory
    2.1. Scratch programs can work with mediums that can store indefinite amounts of addressable data called lists
  3. Assembly requires you to manually manage a stack, often using PUSH and POP instructions
    3.1. Scratch requires you to manually manage a stack, often using list operations
  4. In assembly, to pass values to functions you must put the values in specific registers expected by the function, and to return values you must set a register
    4.1. In Scratch, to return values from a custom block or broadcast you must also set a variable, and to pass values to a broadcast you must use variables and/or lists
  5. Assembly languages often do not include any support for structs, meaning the programmer must implement structures on their own, often by adding offsets to a memory addresses
    5.1. Scratch does not have any support for structs, meaning the programmer must implement structures on their own, often by adding offsets to list indices

Have I said enough?


Hey! You need to log in or create an account to do anything on this forum.

31 posts - 10 conversations - 1 member online

  • Display avatars