Search found 81 matches

by mvk
Tue Mar 31, 2020 6:42 pm
Forum: Programming
Topic: Mini-challenge: detecting activity on a port
Replies: 46
Views: 3421

Re: Mini-challenge: detecting activity on a port

What happens when PORT has more than one state change within your polling interval?
I think that violates Ed's revised spec, Marcel. My interpretation is that transitions occur asynchronously, but don't bunch up too tightly for a reasonable 65xx loop to process.

Ok fair, I missed that.

But then ...
by mvk
Tue Mar 31, 2020 6:15 pm
Forum: Programming
Topic: Mini-challenge: detecting activity on a port
Replies: 46
Views: 3421

Re: Mini-challenge: detecting activity on a port

Chromatix wrote:
My solutions read it only once per pass, so they're guaranteed to see any transition after the initialisation phase.
What happens when PORT has more than one state change within your polling interval?
by mvk
Tue Mar 24, 2020 4:15 pm
Forum: Programming
Topic: Looking for Baum's tiny assembler on Apple-1
Replies: 57
Views: 14084

Re: Looking for Baum's tiny assembler on Apple-1

I added a usage text when starting the mini-assembler with EEER. This makes the program a tiny bit larger than 1K, stretching from $BE5 to $FFF now.

But the good thing is that now there's a second entry point that skips the usage text. This extra help code and text runs from $BE5 to $CA7. The mini ...
by mvk
Sat Feb 29, 2020 3:58 pm
Forum: Programming
Topic: BCD increment without SED?
Replies: 10
Views: 1615

Re: BCD increment without SED?

barrym95838 wrote:
Kind of slow, but smaller than the other patches
I replaced my solution with yours. By keeping it inline, the original program grows with just 2 bytes to a grand total of 172. Bravo!

https://github.com/kervinck/gigatron-ro ... ae0d1307f6
by mvk
Sat Feb 29, 2020 1:53 pm
Forum: Programming
Topic: Looking for Baum's tiny assembler on Apple-1
Replies: 57
Views: 14084

Re: Looking for Baum's tiny assembler on Apple-1


Ah, we're looking at different programs. The one I was talking about, and the one that is used in both videos linked above, is two pages earlier in the section titled "TEST PROGRAM."

Ah, I'm learning something new every day. I agree that the 2012 video must be an anomaly. Anyway, the lower case ...
by mvk
Sat Feb 29, 2020 9:02 am
Forum: Programming
Topic: Looking for Baum's tiny assembler on Apple-1
Replies: 57
Views: 14084

Re: Looking for Baum's tiny assembler on Apple-1

cjs wrote:
I use this one, which doesn't have that error.
I don't spot any improvement from what I posted.
Screenshot 2020-02-29 at 08.51.56.png
by mvk
Sat Feb 29, 2020 7:53 am
Forum: Programming
Topic: Looking for Baum's tiny assembler on Apple-1
Replies: 57
Views: 14084

Re: Looking for Baum's tiny assembler on Apple-1

mvk wrote:
they're showing a variation of the test program from the Apple-1 User manual (which was broken BTW).
cjs wrote:
Regarding that test program (which I use myself), what's broken about it?
In the Apple-1 User Manual it jumps back to the clearing of A:
Screenshot 2020-02-29 at 08.51.56.png
by mvk
Fri Feb 28, 2020 11:50 pm
Forum: Programming
Topic: Looking for Baum's tiny assembler on Apple-1
Replies: 57
Views: 14084

Re: Looking for Baum's tiny assembler on Apple-1


As documented there, the character output translation is:
$00-$1F Print nothing (excepting $0D)
$0D (CR) Moves to the beginning of the next line.
$20-$5F (space through underbar) prints given char
$60-$7F (lower-case etc.) prints same as $40-$5F
($7F is not treated as a control character)
I ...
by mvk
Mon Feb 24, 2020 7:05 am
Forum: Programming
Topic: BCD increment without SED?
Replies: 10
Views: 1615

Re: BCD increment without SED?

GARTHWILSON wrote:
How far up does it need to count? Is 0-19 ok, or does it need to go further?
Certainly past 19. A bad guesser needs many tries. But it doesn't really matter what happens after 99...
by mvk
Sun Feb 23, 2020 10:44 pm
Forum: Programming
Topic: BCD increment without SED?
Replies: 10
Views: 1615

Re: BCD increment without SED?

barrym95838 wrote:
Kind of slow, but smaller than the other patches and works through 99 (allegedly):
That is 10 bytes. The original has 7, so you need 3 bytes to avoid SED. That passes as amazingly clever with me.

[Edited out some of my earlier confusion]
by mvk
Sun Feb 23, 2020 10:10 am
Forum: Programming
Topic: BCD increment without SED?
Replies: 10
Views: 1615

Re: BCD increment without SED?

This is my best shot. First put an escape in place with this JSR:


JSR NXTBCD
ADC TRIES ; ADD 1 TO TRIES IN DECIMAL MODE
STA TRIES

Then do the work in these 13 extra bytes:

NXTBCD: LDA TRIES
AND #$F ; Low nibble
CMP #9 ; Is it 9?
BEQ LOW9 ; If yes, add 7
LDA #4 ; Otherwise add 1
LOW9 ...
by mvk
Sat Feb 22, 2020 8:26 pm
Forum: Programming
Topic: BCD increment without SED?
Replies: 10
Views: 1615

BCD increment without SED?

I'm looking to replace the following snippet with something that doesn't use decimal mode. It should increment TRIES if its lower nibble is under 9, or add 7 if that nibble equals 9. All other cases are "don't care".


; Precondition: A = 0
SEC
SED
ADC TRIES ; ADD 1 TO TRIES IN DECIMAL MODE
STA ...
by mvk
Sat Feb 08, 2020 8:10 pm
Forum: Programming
Topic: Looking for Baum's tiny assembler on Apple-1
Replies: 57
Views: 14084

Re: Looking for Baum's tiny assembler on Apple-1

Ah, that makes sense! I was thinking of racing the beam on an Apple 1 but that didn't mesh with the idea of existing software...
[offtopic] Atari 2600 programmers had it easy with their TIA chip. It took care of an entire scan line while their software could do something else. They even didn't ...
by mvk
Sat Feb 08, 2020 5:42 pm
Forum: Programming
Topic: Looking for Baum's tiny assembler on Apple-1
Replies: 57
Views: 14084

Re: Looking for Baum's tiny assembler on Apple-1

(Hmm, TIA is from the world of Atari - what's the glue which connects the Apple-I application with the TIA output?)
That was a typo, already fixed it.

This effectively reduces the display throughput to about 600 baud (one character per refresh).
Indeed, by emulating the PIA our terminal output ...
by mvk
Sat Feb 08, 2020 2:48 pm
Forum: Programming
Topic: Looking for Baum's tiny assembler on Apple-1
Replies: 57
Views: 14084

Re: Looking for Baum's tiny assembler on Apple-1

I now settled on $EEE as the mini-assembler's entry address. I mapped the code from $C8A..$FDD to do this, and moved the PCADJ routine to free up this nice address without creating a gap.

So the whole package is just 852 bytes, fantastic!

I also added software-based PIA chip emulation. The ...