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: Fri, 08 Jan 2016 00:47:15 -0700 Organization: A noiseless patient Spider Lines: 82 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="3f7daab8c080c0d7ccea7a857596d713"; logging-data="8429"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188sa/po31HImkBpnWnwkNGPFMDbCt6pVA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:eBq2qEQ0kNysblGczRsDAhdLoW0= sha1:ym2PaZig1JUcDpHPYmk4+PSFiG4= Xref: csiph.com comp.sys.apple2:26624 ultramagnus_tcv writes: > On 2016-01-07 20:57:45 +0000, D Finnigan said: > >> Maybe you made a mistake typing the program. > > > Actually, let me display my ignorance a little further here. > > I did a small project in the original Merlin last year while reading > through Assembly Lines (the original, not the reissue). There were > some syntax items I did not remember seeing way back when. Perhaps > that's part of the issue? > > For instance: > > Line 207: CHECKRECV > > In my reading of Assembly Lines, I don't recall seeing labels all > alone on a line. I suppose this is legal in Merlin-8/16? Yes, Merlin allows lines with just labels. They get the current value of the PC (program counter). > Line 27: S0FORADDR EQU $040C > Line 91: CPX #6 > Line 136: LDA #$C0 > > I will go over the new Assembly Lines which I picked up last year, but > I don't recall the type of value I see on Line 91. > > IIRC, $ = Memory Location, #$ = enter value (Hex). Is #6 = enter value > (dec)? Yes, $ in front means hex, % means binary (0s and 1s), nothing means decimal. > > Line 88: :L LDA MAC,X > > Is ":L" merely a label? Indeed, I notice that :L is used in a few > places which leads me to believe this is a label tied to the > particular routine only? :labels are local labels. This means they only keep their value between other global labels. So: BLAH ... :L inx bne :L BLAH2 :L adc #4 bcc :L FOO The first :L loop will increment X until it's zero. The second will add 4 to the accumulator until it overflows and sets the carry. > > Or is the like the top of the listing? :ASM which shows the assembly. Example? > Line 339: INC ]UPPERSIZE+1 > > Does the "]" have any significance beyond being part of a label? Or is > it something like #>? "]" denotes the start of a variable. Variables can be reassigned different values but have global scope. There are restrictions on their use within macros. Also ]1 ... ]9 are for macro arguments. -- -- Jerry awanderin at gmail dot com