Python Forum
what happened here?(noobie) - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Bar (https://python-forum.io/forum-27.html)
+--- Thread: what happened here?(noobie) (/thread-12595.html)



what happened here?(noobie) - SoulsKeeper - Sep-02-2018

trying to understand what is happening in this structure
1. did 0A, 03, and 7F get poped out? if so why were they replaced by 82

2. also how does divide makes sense here? with 00 41


;>|
    Push 2
;>| 02
    Push 7F
;>| 7F 02
    Read            ; assuming user inputs 0x3
;>| 03 7F 02
    Push 0A         ; OFFSET of Adder
;>| 0A 03 7F 02
    Call
;>| 82 02
    Divide
;>| 00 41



RE: what happened here?(noobie) - Gribouillis - Sep-02-2018

May be it has something to do with the fact that 82 divided by 2 gives 41 with a remainder of 0. Also in base 16, one has 03 + 7F = 82.


RE: what happened here?(noobie) - SoulsKeeper - Sep-02-2018

(Sep-02-2018, 01:34 PM)Gribouillis Wrote: May be it has something to do with the fact that 82 divided by 2 gives 41 with a remainder of 0.

why do you get the remainder?(sorry for stupid question still new)

do you have any idea whats happening after the call function? i don't think i get it


RE: what happened here?(noobie) - SoulsKeeper - Sep-02-2018

(Sep-02-2018, 01:02 PM)SoulsKeeper Wrote: trying to understand what is happening in this structure
1. did 0A, 03, and 7F get poped out? if so why were they replaced by 82

2. also how does divide makes sense here? with 00 41


;>|
    Push 2
;>| 02
    Push 7F
;>| 7F 02
    Read            ; assuming user inputs 0x3
;>| 03 7F 02
    Push 0A         ; OFFSET of Adder
;>| 0A 03 7F 02
    Call
;>| 82 02
    Divide
;>| 00 41
no matter where i ask, no one understands why there is a 82 hex after the call, don't know what to do


RE: what happened here?(noobie) - j.crater - Sep-02-2018

Of course no one understands, without documentation/specification of the language you use, best anyone can do is guess.
Have you no documents of any kind at your disposal that would help you with the course/material you are studying?
Besides, perhaps needless, but I should remind you this is a Python users community forum. Which, despite all efforts to help you, is probably not the best place to look for answers to this kind of questions.