Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #5061 > unrolled thread

Assembly 80 column text

Started byDu Hast <duhast6377@gmail.com>
First post2019-04-08 18:23 -0700
Last post2019-04-11 19:19 -0700
Articles 3 on this page of 23 — 7 participants

Back to article view | Back to comp.sys.apple2.programmer


Contents

  Assembly 80 column text Du Hast <duhast6377@gmail.com> - 2019-04-08 18:23 -0700
    Assembly 80 column text gids.rs@sasktel.net - 2019-04-08 18:57 -0700
      Assembly 80 column text gids.rs@sasktel.net - 2019-04-08 18:59 -0700
        Assembly 80 column text gids.rs@sasktel.net - 2019-04-08 19:06 -0700
          Assembly 80 column text Antoine Vignau <antoine.vignau@laposte.net> - 2019-04-09 06:19 -0700
            Re: Assembly 80 column text Du Hast <duhast6377@gmail.com> - 2019-04-09 18:23 -0700
              Re: Assembly 80 column text gids.rs@sasktel.net - 2019-04-09 19:51 -0700
                Re: Assembly 80 column text Du Hast <duhast6377@gmail.com> - 2019-04-10 17:25 -0700
                  Re: Assembly 80 column text D Finnigan <dog_cow@macgui.com> - 2019-04-11 00:50 +0000
                    Re: Assembly 80 column text Michael J. Mahon <mjmahon@aol.com> - 2019-04-10 20:40 -0500
                    Re: Assembly 80 column text Du Hast <duhast6377@gmail.com> - 2019-04-11 19:18 -0700
                      Re: Assembly 80 column text Antoine Vignau <antoine.vignau@laposte.net> - 2019-04-11 21:26 -0700
                      Re: Assembly 80 column text Michael J. Mahon <mjmahon@aol.com> - 2019-04-12 00:43 -0500
                        Re: Assembly 80 column text Antoine Vignau <antoine.vignau@laposte.net> - 2019-04-12 09:59 -0700
                        Re: Assembly 80 column text Michael Pohoreski <michael.pohoreski@gmail.com> - 2019-04-12 13:17 -0700
                          Re: Assembly 80 column text Antoine Vignau <antoine.vignau@laposte.net> - 2019-04-12 14:20 -0700
                            Re: Assembly 80 column text Michael Pohoreski <michael.pohoreski@gmail.com> - 2019-04-12 15:21 -0700
                          Re: Assembly 80 column text Michael J. Mahon <mjmahon@aol.com> - 2019-04-12 17:18 -0500
                        Re: Assembly 80 column text Du Hast <duhast6377@gmail.com> - 2019-04-12 15:15 -0700
                          Re: Assembly 80 column text Michael J. Mahon <mjmahon@aol.com> - 2019-04-12 17:25 -0500
                          Re: Assembly 80 column text gids.rs@sasktel.net - 2019-04-12 19:08 -0700
                  Re: Assembly 80 column text gids.rs@sasktel.net - 2019-04-10 21:52 -0700
                  Re: Assembly 80 column text James Davis <JPD.Enterprises@outlook.com> - 2019-04-11 19:19 -0700

Page 2 of 2 — ← Prev page 1 [2]


#5086

Fromgids.rs@sasktel.net
Date2019-04-12 19:08 -0700
Message-ID<450f239c-6722-4642-9565-2ae4381b7a95@googlegroups.com>
In reply to#5081
On Friday, April 12, 2019 at 4:15:32 PM UTC-6, Du Hast wrote:
> On Friday, April 12, 2019 at 1:43:17 AM UTC-4, mjm...@aol.com wrote:
> > Du Hast <duhast6377!gmail.com> wrote:
> > > On Wednesday, April 10, 2019 at 8:50:57 PM UTC-4, D Finnigan wrote:
> > >> Du Hast wrote:
> > >>> 
> > >>> Ok, but actually according to What's Where that routine just prints
> > >>> blanks.
> > >>> Is there any really detailed breakdown of the entry points or is basically
> > >>> you have to go through the source code and figure it out?
> > >>> 
> > >> 
> > >> You can make your own entry points where ever you want. But for ROM
> > >> compatibility, you're only supposed to use Apple's published entry points.
> > >> They really bent over backwards to ensure that these entry points stayed the
> > >> same throughout ROM revisions.
> > >> 
> > >> Apple published the Monitor ROM entry points in its Apple II Reference
> > >> manuals for Apple II, II Plus, IIe, IIc, and so on.
> > >> 
> > >> -- 
> > >> ]DF$
> > >> The New Apple II User's Guide:
> > >> https://macgui.com/newa2guide/
> > > 
> > > I've been reading the manuals and what I'm not finding is what is the
> > > difference between the entry points.  The clear line example:
> > > 
> > > CLEOLZ $FC9E
> > > F.CLEOLZ $C19C
> > > B.CLEOLZ $C1D9
> > > X.GSEOLZ $CD4E
> > > 
> > > Apple references state the first address.  What's Where describes all the
> > > others as "entry points for the clear line subroutine".  Just go with
> > > Apple?  How do you know what the others do besides trial and error or
> > > studying all the code?  The C series are in the 80 column card?
> > > 
> > 
> > In the case of the above labels (but without looking at the monitor listing
> > :-), it looks to me like the only actual entry point is CLEOLZ. The other
> > labels look like labels that the main entry point transfers to in order to
> > perform its function. For example, I’d guess that X.GSEOLZ is the routine
> > added to the monitor to support the IIgs, and that the main entry point
> > goes here after determining that it’s running on a IIgs.  The other two
> > labels seem likely to be used in the stubs and vectors needed to transfer
> > to code in a different ROM bank. 
> > 
> > Listings like “What’s Where...” are most useful for reverse engineering
> > code, by providing hints about the purpose of a CALL or JSR. I don’t find
> > them particularly useful when writing code. 
> > 
> > Certainly these lists are no substitute for reading and understanding the
> > code, especially since the WW listings seldom describe registers preserved
> > or any “side effects” of the entry point. 
> > 
> > While reading code may seem like non-productive work, practice in reading
> > and understanding code is one of the very best ways to master assembly
> > language—especially when the code you’re reading is masterful code. ;-)
> > 
> > The monitor, particularly the original (the ][ and ][+), is very pretty
> > code, written mostly by Woz and his friend Allen Baum. Every time I read a
> > few pages I learn a new technique!  
> > 
> > Later monitors also contain fine code, but adding functions while
> > preserving the original entry points and visible memory footprint requires
> > a lot of dancing around that interferes with the original esthetic—or maybe
> > it’s just differently pretty:  in its achievement of backward
> > compatibility.  :-)
> > -- 
> > -michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com
> 
> Well I bought What's Where because it's the "canonical" listing and I was hoping that after 40 years there would be a nice easy reference to the monitor, but I guess not....


Quick Reference Cards are so handy.

Supported Monitor Commands

F800 - PLOT		FB60 - APPLE II		FD6F - GETLN1
F80E - PLOT1		FB6F - SETPWRC		FD8B - CROUT1
F819 - HLINE		FB78 - VIDWAIT		FD8E - CROUT
F828 - VLINE		FB88 - KBDWAIT		FD92 - PRA1
F832 - CLRSCRN		FBB3 - VERSION		FDDA - PRBYTE
F836 - CLRTOP		FBBF - ZIDBYTE2		FDE3 - PRHEX
F847 - GBASCALC		FBC0 - ZIDBYTE		FDED - COUT
F85F - NXTCOL		FBC1 - BASCALC		FDF0 - COUT1
F864 - SETCOL		FBDD - BELL1		FDF6 - COUTZ
F871 - SCRN		FBE2 - BELL1.2		FE1F - IDROUTINE
F88C - INSDS1.2		FBE4 - BELL2		FE2C - MOVE
F88E - INSDS2		FBF0 - STORADV		FE5E - @LIST
F890 - GET816LEN	FBF4 - ADVANCE		FE80 - SETINV
F8D0 - INSTDSP		FBFD - VIDOUT		FE84 - SETNORM
F940 - PRNTYX		FC10 - BACKSPC		FE89 - SETKBD
F941 - PRNTAX		FC1A - UP		FE8B - INPORT
F944 - PRNTX		FC22 - VTAB		FE93 - SETVID
F948 - PRBLNK		FC24 - VTABZ		FE95 - OUTPORT
F94A - PRBL2		FC42 - CLREOP		FEB6 - GO
F953 - PCADJ		fC58 - HOME		FECD - @WRITE
F962 - TXT2COPY		FC62 - CR		FEFD - @READ
FA40 - OLDIRQ		FC66 - CR		FF2D - PRERR
FA4C - BREAK		FC70 - SCROLL		FF3A - BELL
FA59 - OLDBRK		FC9C - CLREOL		FF3F - RESTORE
FA62 - RESET		FC9E - CLREOLZ		FF4A - SAVE
FAA6 - PWRUP		FCA8 - WAIT		FF58 - IORTS
FABA - SLOOP		FCB4 - NXTA4		FF59 - OLDRST
FAD7 - REGDSP		FCBA - NXTA1		FF65 - MON
FB19 - *RTBL		FCC9 - @HEADR		FF69 - MONZ
FB1E - PREAD		FD0C - RDKEY		FF6C - MONZ2
FB21 - PREAD4		FD10 - FD10		FF70 - MONZ4
FB2F - INIT		FD18 - RDKEY1		FF8A - DIG
FB39 - SETTXT		FD1B - KEYIN		FFA7 - GETNUM
FB40 - SETGR		FD35 - RDCHAR		FFAD - NXTCHAR
FB4B - SETWND		FD67 - GETLNZ		FFBE - TOSUB
FB51 - SETWND2		FD6A - GETLN		FFC7 - ZMODE
FB5B - TABV		FD6C - GETLN0

[toc] | [prev] | [next] | [standalone]


#5072

Fromgids.rs@sasktel.net
Date2019-04-10 21:52 -0700
Message-ID<e51c97d8-571f-49a1-98bf-6888e095fc19@googlegroups.com>
In reply to#5069
> > So, your code above can be reduced from:
> > 
> >          STA   CHAR       ; SAVE CHAR
> > CLEAR    LDY   #$4F       ; 80 CHARS
> >          LDA   CHAR       ; GET CHAR
> > LOOP     JSR   COUT       ; PRINT IT
> >          DEY              ; COUNT-1
> >          BNE   LOOP       ; NOT ZERO
> > 
> > to:
> > 
> >          LDX #$4F
> >          JSR $F94C
> 
> Ok, but actually according to What's Where that routine just prints blanks.  Is there any really detailed breakdown of the entry points or is basically you have to go through the source code and figure it out?


I should have looked at the branch closer.  The Accumulator is supposed to be preserved through input/output calls, so the branch back to the LDA #$A0 is unnecessary.  You can see this is true by typing in your own code.

300:A9 20 A9 C1 20 ED FD CA DO FA 60

Just an FYE, there is a built in mini-assembler on some machines that allow a quick way to program in machine language.  Just type the exclamation mark when you are in the monitor.  Might be a little handier typing in the small stuff.

CALL -151
!

Start by entering the starting address as in  300:LDX #4F
after that just enter a space followed by the mnemonic.

[toc] | [prev] | [next] | [standalone]


#5074

FromJames Davis <JPD.Enterprises@outlook.com>
Date2019-04-11 19:19 -0700
Message-ID<86792ac4-7097-4e19-b3aa-8aaac7416e94@googlegroups.com>
In reply to#5069
On Wednesday, April 10, 2019 at 5:25:10 PM UTC-7, Du Hast wrote:
> Is there any really detailed breakdown of the entry points or is basically you have to go through the source code and figure it out?

Du Hast,

Write to me personally with an email address to send you my text documents:

Apple  IIe Memory Equates for Assembly Programmers (Mnemonic)
Apple  IIe Memory Equates for Assembly Programmers (Not Numeric)

I don't remember if I already uploaded them to Asimov or not, but you could search for them there, too.

James Davis 

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.sys.apple2.programmer


csiph-web