Search found 24 matches

by N2TheRed
Sun Oct 01, 2017 7:53 am
Forum: Newbies
Topic: Boolean Algebra Question
Replies: 11
Views: 2475

Re: Boolean Algebra Question

8BIT wrote:
This truth table is a good example of logic that does not reduce to simple terms.

Daryl
If I'm understanding this correctly, I just happened to make up an example that was a little complex.
by N2TheRed
Sun Oct 01, 2017 7:49 am
Forum: Newbies
Topic: Boolean Algebra Question
Replies: 11
Views: 2475

Re: Boolean Algebra Question

rwiker wrote:
8BIT wrote:
There is a minor error in this:

/A/BC + A/B/C + AB/C = A/B/C + AB/C + /A/BC = A/C(B+/B) + AB/C = A/C + AB/C

If should be:

/A/BC + A/B/C + AB/C = A/B/C + AB/C + /A/BC = A/C(B+/B) + AB/C = A/C + /A/BC
What does the underline represent?
by N2TheRed
Sun Oct 01, 2017 7:48 am
Forum: Newbies
Topic: Boolean Algebra Question
Replies: 11
Views: 2475

Re: Boolean Algebra Question

Thanks for everyone that replied.
by N2TheRed
Mon Sep 25, 2017 6:08 am
Forum: Newbies
Topic: Boolean Algebra Question
Replies: 11
Views: 2475

Re: Boolean Algebra Question

It has been about 30 years since I attempted any boolean algebra or Karnaugh mapping, so please take my limited advice with a grain of salt, but I think that you might be able to leave the first term alone and factor /C out of the second and third terms, ending up with /A/BC + /CA. Going back to ...
by N2TheRed
Mon Sep 25, 2017 1:48 am
Forum: Newbies
Topic: Boolean Algebra Question
Replies: 11
Views: 2475

Boolean Algebra Question

I created a truth table with three inputs and randomly select high outputs so that I could practice doing boolean algebra. I've been able to answer some I've seen on the internet, but have failed when I just made up my own example to practice with. I've included a picture to see how far I got and ...
by N2TheRed
Thu Aug 03, 2017 12:21 pm
Forum: Programming
Topic: Best way to start learning 6502 Assembler
Replies: 13
Views: 17605

Re: Best way to start learning 6502 Assembler

http://64bites.com/
"Learn BASIC and 6502 Assembly with bite-sized video tutorials today!"
by N2TheRed
Wed Aug 02, 2017 6:23 pm
Forum: Programming
Topic: Placeholders in assembly: How is it done?
Replies: 18
Views: 2862

Re: Placeholders in assembly: How is it done?

I think the 6502 stacks treatise will be very helpful, especially the following chapters (although it's good to read it all, in order):

5. stack addressing
6. passing parameters
7. inlined data
13. synthesizing 65816 stack instructions
14. local variables and environments

I have that saved ...
by N2TheRed
Wed Aug 02, 2017 5:35 pm
Forum: Programming
Topic: Placeholders in assembly: How is it done?
Replies: 18
Views: 2862

Re: Placeholders in assembly: How is it done?

I find it hard to believe that I was able to get part of it to work.
by N2TheRed
Wed Aug 02, 2017 3:33 pm
Forum: Programming
Topic: Placeholders in assembly: How is it done?
Replies: 18
Views: 2862

Re: Placeholders in assembly: How is it done?

The only real problem with pushing the elements on the stack is that it's not really a viable option on the 6502, not on the system stack at least, and especially not string values. You can push them on A stack (Forth uses the top of Zero page and indexes with X), but that's using X as your stack ...
by N2TheRed
Wed Aug 02, 2017 10:28 am
Forum: Programming
Topic: Placeholders in assembly: How is it done?
Replies: 18
Views: 2862

Re: Placeholders in assembly: How is it done?

BigEd wrote:
It will be interesting to see what you come up with.

It has turned out rather challenging.
by N2TheRed
Wed Aug 02, 2017 10:14 am
Forum: Programming
Topic: Placeholders in assembly: How is it done?
Replies: 18
Views: 2862

Re: Placeholders in assembly: How is it done?

I'm not of much help here but are you talking about
making an assembler to parse strings or just
writing some code with embedded subroutines?
It looks like you are writing an assembler.
Dwight

I'm just a noob, but I have big dreams!

I'm learning x86 and 6502, so writing an assembler is like a ...
by N2TheRed
Wed Aug 02, 2017 10:10 am
Forum: Programming
Topic: Placeholders in assembly: How is it done?
Replies: 18
Views: 2862

Re: Placeholders in assembly: How is it done?

Here's a straight forward stab in basic C.

It "works", that is it compiles and builds and runs, and should convey the concepts. It doesn't use any library functions (save printf for the example).

Most routines that accept variable numbers of arguments represent those arguments as an array, that's ...
by N2TheRed
Tue Aug 01, 2017 12:08 pm
Forum: Programming
Topic: Placeholders in assembly: How is it done?
Replies: 18
Views: 2862

Re: Placeholders in assembly: How is it done?

Yes, something like that. I'm quite sure that any approach I might sketch out would be modified if I actually sat down to try to write the code.

By handler I just meant a subroutine. In fact, with your problem as stated, you need to turn the ASCII digits into a number, as well as checking that the ...
by N2TheRed
Tue Aug 01, 2017 11:44 am
Forum: Programming
Topic: Placeholders in assembly: How is it done?
Replies: 18
Views: 2862

Re: Placeholders in assembly: How is it done?

With the {n} syntax, it becomes a parsing problem. I think I'd call a handler as soon as I see the "{", whose job is to process the {n} and to return an error (somehow) if the syntax is wrong.

In the case of printf, if you want to print an actual % you use %%. Again, the handler can do that ...
by N2TheRed
Tue Aug 01, 2017 11:00 am
Forum: Programming
Topic: Placeholders in assembly: How is it done?
Replies: 18
Views: 2862

Re: Placeholders in assembly: How is it done?

Anything's possible - but it does sound like it would take a little thought.

(A more old fashioned example of the same thing would be C's
printf("one: %d two: %d", a, b)
)

First problem: you need to pass a list of parameters, and the 6502 has no simple calling convention. Perhaps some kind of ...