Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #1924
| From | Benoit0123 <bgilon@free.fr> |
|---|---|
| Newsgroups | comp.sys.apple2.programmer |
| Subject | Re: DA statement not registering after running compiled program. |
| Date | 2015-10-26 10:08 +0000 |
| Organization | Mac GUI |
| Message-ID | <benoit0123-1445854213@macgui.com> (permalink) |
| References | <9106d3b6-6cd3-41d3-bec5-d604f093bd67@googlegroups.com> |
jamesiwalker77 wrote: > It seems to me that the DA statement is somehow not registering. > > My code is: > ORG $300 > LDA $6000 > STA $2000 > DONE RTS > ORG $6000 > DA $FFFF > > I compiled this program, and Merlin shows correct compilation, with the > values of memory addresses $6000 and $6001 both set to $FF. > > However, after I save the source and object code (after compiling), I > leave > the assembler, switch to HGR and BRUN the program. There should be a > white > line in the upper left corner of the screen. There are pixels plotted > there, but not a white line. It seems to be pulling other values from > $6000 and $6001 than what my DA statement should put in those addresses. > Even after going to the monitor and examining $6000 and $6001, neither are > $FF. > > Anyone have any idea what is going on here? It seems that there's > possibly > some point about how program memory is saved which I am missing here. > Below is an amended source code w/o having to deal with two separate object code that should also work. And yes, the Merlin assembler works as designed and is a great tool. ORG $0300 LDX #DATEND-DATBEG-1 ]LOOP LDA DATBEG,X STA $6000,X DEX BPL ]LOOP * Now you can play as if data was @ $6000 LDA $6000 STA $2000 DONE RTS DATBEG ORG $6000 DA $FFFF * The following ORG restore the original assembly PC (adjusted by the amount * of code assembled since the ORG $6000 directive above). ORG DATEND -- Growing old is mandatory.. growing up is optional.. But the other way round is as true.
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
DA statement not registering after running compiled program. jamesiwalker77@gmail.com - 2015-10-25 21:59 -0700 Re: DA statement not registering after running compiled program. John Brooks <jbrooks@blueshiftinc.com> - 2015-10-25 22:55 -0700 Re: DA statement not registering after running compiled program. Benoit0123 <bgilon@free.fr> - 2015-10-26 10:08 +0000 Re: DA statement not registering after running compiled program. "Anton Treuenfels" <teamtempest@yahoo.com> - 2015-10-26 08:49 -0500 Re: DA statement not registering after running compiled program. jamesiwalker77@gmail.com - 2015-10-26 10:23 -0700
csiph-web