Search found 14 matches

by KLset
Mon Oct 23, 2017 6:49 am
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

BigDumbDinosaur wrote:
.REPT is an alternative to .REPEAT in the Kowalski assembler.
Sorry! My mistake. It's even in the kowalski_directives.txt that you shared.
by KLset
Sun Oct 22, 2017 1:31 pm
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

Next thing you need to learn is assembler directives. In the Kowalski simulator you can bloat your code automatically: [...] Very useful! And I see you also made better use of the X register, doubling as both the color and location; nice! I had a look at the ca65 syntax for repetition, and indeed ...
by KLset
Sun Oct 22, 2017 6:55 am
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

barrym95838 wrote:
I noticed that you weren't making use of LDX # and LDY # at the beginning of your latest creation, and that you made the dangerous assumption further down that the carry was clear before the ADC #1 in the first run through the loop.
I should have done both of those! Thank you having a look.
by KLset
Sat Oct 21, 2017 8:44 pm
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

POC V2 generates wait-states by controlling the MPU's RDY input, which is the least problematic method, in my opinion. As Ed noted, changing clock speeds requires some very careful planning to avoid a glitch that will crash the machine.
I found the RDY signal in the datasheet! Let's see if I get ...
by KLset
Sat Oct 21, 2017 3:41 pm
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

Comments and critiques are welcome. What a great learning experience, thank you. I analyzed it but I need some time to digest! So, like you wrote, the approach is to minimize loop overhead by painting more pixels per iteration. I assume the fastest program would just be a series of STA calls that ...
by KLset
Fri Oct 20, 2017 7:21 am
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

POC V2 generates wait-states by controlling the MPU's RDY input, which is the least problematic method, in my opinion. As Ed noted, changing clock speeds requires some very careful planning to avoid a glitch that will crash the machine.
I found the RDY signal in the datasheet! Let's see if I get ...
by KLset
Thu Oct 19, 2017 6:23 pm
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

All very useful information. Many thanks, BigDumbDinosaur.

ICEs are not much used anymore—you can blow up a lot of 65C02s for the cost of an ICE.

It never crossed my mind that embedded developers might even once cause a CPUs to blow up during development. I won't buy them in single-packs ...
by KLset
Thu Oct 19, 2017 11:31 am
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

http://forum.6502.org/viewtopic.php?f=1&t=2978

As long as I know what the simulator/emulator I'm using does, the terminology matters less for me.

In any case, even most of the sofware 6502 imitators are not cycle-accurate, so they would not qualify as emulators by anyone's definition.

Meaning ...
by KLset
Thu Oct 19, 2017 8:20 am
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

GARTHWILSON wrote:
Let me take the opportunity to recommend David Eyes' and Ron Lichty's excellent programming manual...
Good tip! It would be a lot nicer to have a comprehensive book on the 6502 family rather than a collection of PDF files.
by KLset
Thu Oct 19, 2017 8:15 am
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

BigDumbDinosaur, thanks for the info on the Kowalski SIMulator. I looked up the difference between a simulator and an emulator. From what I understand, operating on the stack as is done in the program I posted should be slower in the simulator compared to other methods, as hinted by 8BIT (perhaps ...
by KLset
Wed Oct 18, 2017 6:57 pm
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

...

Aha, so the stack is slow(er). I should get some data sheets on the 6502. Now that I know that, I'll try and write another version that does not make use of the stack. (As a sidenote, I think using the stack was mostly used as an example by Nick Morgan who wrote the Easy 6502 tutorial.)

The ...
by KLset
Wed Oct 18, 2017 6:49 pm
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program


Assembler choice is very much a matter of taste. If you like a command line and develop on the desktop, ca65 from cc65 is popular. If you like something like an IDE, Kowalski's simulator is good. If you want to write something quickly in the browser, there are a number of in-browser assemblers and ...
by KLset
Wed Oct 18, 2017 6:14 pm
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

Re: First 6502 assembly program

About the loop counters; the Y register contains the address to the pixel on the current line, and so the first loop paints the first half of the line and at the same time pushes the color for each painted pixel onto the stack. The second loop paints the second line of the line, and this time uses ...
by KLset
Wed Oct 18, 2017 11:43 am
Forum: Programming
Topic: First 6502 assembly program
Replies: 37
Views: 8123

First 6502 assembly program

Hi everyone,

I decided to learn assembly and 6502 seems like a good platform to learn on. Here's my first program; I'm following the guide on http://skilldrick.github.io/easy6502. My modification to the original program is the addition of the `nextline` routine and the two accompanying lines at the ...