Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: awanderin Newsgroups: comp.sys.apple2 Subject: Re: Uthernet II Assembly Listing Questions Date: Sat, 09 Jan 2016 00:02:20 -0700 Organization: A noiseless patient Spider Lines: 40 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="3f7daab8c080c0d7ccea7a857596d713"; logging-data="7933"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VU/sibSruj48/WCWagdfCn71k2LBYjFI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:15at3S7D7qAQAJ1UaEW4Ho5ZFto= sha1:Z889s35K2H/9O3NNr3IaXaIJuDk= Xref: csiph.com comp.sys.apple2:26656 ultramagnus_tcv writes: > On 2016-01-08 07:47:15 +0000, awanderin said: > >>> IIRC, $ = Memory Location, #$ = enter value (Hex). Is #6 = enter value >>> (dec)? >> >> Yes, $ in front means hex, % means binary (0s and 1s), nothing means >> decimal. > > Thank you, Jerry. > > But what is: #6? The # indicates immediate mode. What this means is that the operand value itself is loaded into the register (for LDA/LDX/CPY), or whatever other operation the mnemonic determines (CMP/SBC/EOR/AND, you get the idea). With other addressing modes, the operand value is a memory address from which the value is fetched before performing the operation. LDA #xxx loads the value xxx into the accumulator. If xxx == "$10", then 16 (base-10) is loaded. If xxx == "10", then 10 (base-10) is loaded. In Merlin, if xxx == "%1011", then 11 (base-10) is loaded. Conversely, all these examples below load the contents of memory address 64 into the accumulator: lda $40 lda 64 lda %1000000 -- -- Jerry awanderin at gmail dot com