I don't know precisely what the difference is between a method and a function and at this point I'm afraid to ask
Conversation
Notices
-
Eniko Fox (eniko@peoplemaking.games)'s status on Monday, 09-Dec-2024 06:33:21 JST Eniko Fox -
Foone🏳️⚧️ (foone@digipres.club)'s status on Monday, 09-Dec-2024 06:33:20 JST Foone🏳️⚧️ @eniko what about a procedure? and a subroutine?
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Monday, 09-Dec-2024 16:04:19 JST Foone🏳️⚧️ @jbqueru @eniko fun fact: I'm currently writing assembly code for an environment where it does matter for me: I'm doing 32bit x86 assembly for a mixed borland/msvc environment. So I have multiple C calling conventions in play, plus my own code which has no need to obey any such conventions!
Yes, it's only slightly a nightmare.
-
Eniko Fox (eniko@peoplemaking.games)'s status on Monday, 09-Dec-2024 16:04:20 JST Eniko Fox @foone oh no 😱
-
Jean-Baptiste "JBQ" Quéru (jbqueru@fosstodon.org)'s status on Monday, 09-Dec-2024 16:04:20 JST Jean-Baptiste "JBQ" Quéru @eniko @foone I write assembly. RET is nothing more than POP PC, i.e. (in pseudo-68k) JMP (SP)+. Your talk about methods and functions and procedures and subroutines means nothing to me.
;-)
-
Jean-Baptiste "JBQ" Quéru (jbqueru@fosstodon.org)'s status on Monday, 09-Dec-2024 16:39:24 JST Jean-Baptiste "JBQ" Quéru @foone @eniko Oh yeah, I know that feeling.
Being free from calling conventions is a strength and weakness of assembly. Those are part of the overhead of higher-level languages, and you might as well use a compiler if you're willing to incur that overhead.
I have a piece of Z80 code that I'm currently working on, where the calling convention includes "the caller must set DE to $0006, and the callee must not modify it, don't ask."
Yes, I think of C as a high-level language, it's all relative.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Monday, 09-Dec-2024 16:39:24 JST Foone🏳️⚧️ @jbqueru @eniko Yep. It's all relative! Like, I only just this week switched to a macro assembler for my assembly, and I did it so I could get a "higher-level language": NASM assembly, which is higher level than raw Ghidra assembly-one-instruction.
So I totally get what you mean about levels, as I've personally felt the level-differences very painfully recently!
-