He's obviously working in base 10, BDD, at least in the source. And 30004 #0 is his way of saying
Code:
org $7534
dcb 0
.......NOPE... your wrong. When I started learning assembly.. I couldn't take the hex, so I built an assembler that
did everything entirely in decimal... and then has my ...
Search found 18 matches
- Thu Sep 07, 2017 1:17 pm
- Forum: Newbies
- Topic: What is the problem with this logic? ( IF C < 16 THEN.....
- Replies: 20
- Views: 3793
- Thu Sep 07, 2017 1:08 pm
- Forum: Newbies
- Topic: What is the problem with this logic? ( IF C < 16 THEN.....
- Replies: 20
- Views: 3793
Re: What is the problem with this logic? ( IF C < 16 THEN..
I am sorry about being a big pain in the butt about this (putting it mildly)...
I figured out what the bug was... take the basic
10 IF C<16 THEN C=C+1:GOTO 10
20 C=0:GOTO 10
Now take what I did...
10000 JSR A
10003 JSR B
10006 JSR (END..BACK TO COMPUTER PROMPT)
A IF C<16 THEN C=C+1:GOTO A
*(IF ...
I figured out what the bug was... take the basic
10 IF C<16 THEN C=C+1:GOTO 10
20 C=0:GOTO 10
Now take what I did...
10000 JSR A
10003 JSR B
10006 JSR (END..BACK TO COMPUTER PROMPT)
A IF C<16 THEN C=C+1:GOTO A
*(IF ...
- Wed Sep 06, 2017 10:50 pm
- Forum: Newbies
- Topic: What is the problem with this logic? ( IF C < 16 THEN.....
- Replies: 20
- Views: 3793
Re: What is the problem with this logic? ( IF C < 16 THEN..
Whoop... I this instance, I want to loop it back to the IF statement... creates an endless loop...
- Wed Sep 06, 2017 10:49 pm
- Forum: Newbies
- Topic: What is the problem with this logic? ( IF C < 16 THEN.....
- Replies: 20
- Views: 3793
What is the problem with this logic? ( IF C < 16 THEN.....
What is wrong with this logic... I am trying to build a 16 bit IF THEN statement... such as
IF C < 16 THEN (Pass thru to argument...
(If failed...RTS)
Assume these are the current values...
30005 #0
30004 #0
30016- AD 35 75 LDA 30005
30019- C9 00 CMP #0
30021- 90 0A BCC 30033
30023- D0 07 BNE ...
IF C < 16 THEN (Pass thru to argument...
(If failed...RTS)
Assume these are the current values...
30005 #0
30004 #0
30016- AD 35 75 LDA 30005
30019- C9 00 CMP #0
30021- 90 0A BCC 30033
30023- D0 07 BNE ...
- Fri Sep 01, 2017 11:51 pm
- Forum: Programming
- Topic: displaying a decimal number... using 2 byte value...
- Replies: 23
- Views: 9353
Re: displaying a decimal number... using 2 byte value...
I had somebody from the Apple II forum help me with a specific routine that uses partial ROM routines to help... still not concise code but it works (*Only for APPLE II 6502)
Place your 3 binary values (24bit number) into Y,X,A from highest to lowest...
30032- AC 39 75 LDY 30009
30035- AE 38 75 ...
Place your 3 binary values (24bit number) into Y,X,A from highest to lowest...
30032- AC 39 75 LDY 30009
30035- AE 38 75 ...
- Fri Sep 01, 2017 7:39 pm
- Forum: Programming
- Topic: displaying a decimal number... using 2 byte value...
- Replies: 23
- Views: 9353
Re: displaying a decimal number... using 2 byte value...
I forgot... cant use tables... its actually going into a Compiler... now I really sound off my rocker.. cant program ASM but making a compiler..... don't worry bout me... I had to make an assembler before I could program ASM at all... long story!
- Fri Sep 01, 2017 7:35 pm
- Forum: Programming
- Topic: displaying a decimal number... using 2 byte value...
- Replies: 23
- Views: 9353
Re: displaying a decimal number... using 2 byte value...
If I have 16 bit number... say (2) (2) that means its 2*256+2 or 512+2 or 514 final result. How do I output that 514 to the screen... (its apple ii, I know the output routines....) how do I get the two bytes to equal 5 1 4 so I can output them... or similar?!?
- Fri Sep 01, 2017 6:55 pm
- Forum: Programming
- Topic: displaying a decimal number... using 2 byte value...
- Replies: 23
- Views: 9353
Re: displaying a decimal number... using 2 byte value...
----------------------------DEC ASSEMBLY
30000- F8 SED
30001- A9 00 LDA #0
30003- 8D 20 4E STA 20000
30006- 8D 21 4E STA 20001
30009- 8D 22 4E STA 20002
30012- 0E A8 61 ASL 25000
30015- 2E A9 61 ROL 25001
30018- AD 20 4E LDA 20000
30021- 6D 20 4E ADC 20000
30024- 8D 20 4E STA 20000
30027- AD 21 4E ...
30000- F8 SED
30001- A9 00 LDA #0
30003- 8D 20 4E STA 20000
30006- 8D 21 4E STA 20001
30009- 8D 22 4E STA 20002
30012- 0E A8 61 ASL 25000
30015- 2E A9 61 ROL 25001
30018- AD 20 4E LDA 20000
30021- 6D 20 4E ADC 20000
30024- 8D 20 4E STA 20000
30027- AD 21 4E ...
- Fri Sep 01, 2017 6:54 pm
- Forum: Programming
- Topic: displaying a decimal number... using 2 byte value...
- Replies: 23
- Views: 9353
Re: displaying a decimal number... using 2 byte value...
I need HELP... i am a serious idiot... The 6502 LINK above this one has two routines... I coded it exactly as above (2nd routine)... placing in one set of numbers at 25000 and the other at 20000 (25001, 25002 ect, 20000, 20001)... if I input in the two original positions 1 and 1 (signifying a number ...
- Fri Sep 01, 2017 6:54 pm
- Forum: Programming
- Topic: displaying a decimal number... using 2 byte value...
- Replies: 23
- Views: 9353
Re: displaying a decimal number... using 2 byte value...
This is reference material... question afterwards....
Here is an equivalent routine for converting 16-bit numbers: ; Convert an 16 bit binary value to BCD
;
; This function converts a 16 bit binary value into a 24 bit BCD. It
; works by transferring one bit a time from the source and adding it ...
Here is an equivalent routine for converting 16-bit numbers: ; Convert an 16 bit binary value to BCD
;
; This function converts a 16 bit binary value into a 24 bit BCD. It
; works by transferring one bit a time from the source and adding it ...
- Fri Sep 01, 2017 6:53 pm
- Forum: Programming
- Topic: displaying a decimal number... using 2 byte value...
- Replies: 23
- Views: 9353
displaying a decimal number... using 2 byte value...
If you have a multi-byte value... for instance... say b1= (2) b2= (2) that equals 514 in decimal... how would you code... loading those two bytes to print the decimal representation...?
- Sat Jan 02, 2016 3:41 am
- Forum: Newbies
- Topic: Need help to Add numbers to X and Y registures
- Replies: 23
- Views: 7620
Re: Need help to Add numbers to X and Y registures
I'm pretty much going to end the thread because the objective has been completed... but something opened my eyes about this assembly stuff just talking with you guys. I've had a couple of books in front of me and been reading them almost every weekend, and it might as well have been in greek or ...
- Thu Dec 31, 2015 8:06 am
- Forum: Newbies
- Topic: Need help to Add numbers to X and Y registures
- Replies: 23
- Views: 7620
Re: Need help to Add numbers to X and Y registures
This is an example of the LoRes Graphic Digitizer for Apple II your 'simple help' allowed me to do...
https://www.youtube.com/watch?v=zH8iBubD69w
And also ended a year's worth of confusion reading assembly books, but remaining in the fog despite many weekends scratching my head! Thanks again! -Tom
https://www.youtube.com/watch?v=zH8iBubD69w
And also ended a year's worth of confusion reading assembly books, but remaining in the fog despite many weekends scratching my head! Thanks again! -Tom
- Tue Dec 29, 2015 12:50 pm
- Forum: Newbies
- Topic: Need help to Add numbers to X and Y registures
- Replies: 23
- Views: 7620
Re: Need help to Add numbers to X and Y registures
Something clicked around 3am this morning.... I get it now, at least the basics. I even wrote a little code this morning after a short nap, and it worked flawless the first time with no debugging! I couldn't understand that there are 3 reg's, the X, the Y and the Accumulator. Even went back and ...
- Tue Dec 29, 2015 4:43 am
- Forum: Newbies
- Topic: Need help to Add numbers to X and Y registures
- Replies: 23
- Views: 7620
Re: Need help to Add numbers to X and Y registures
If you have nothing to do, This is the Music Master RPG...
https://www.dropbox.com/s/tuecdmul18csmr7/mUSIC%20mASTER%20rPG%20DeMo%20%28Updated%20Apr%202nd-15%29.zip?dl=0
My very first 'game'. There is a sequel actually 1/2 done that has 3 times the people, 3 times the music and a huge world/map ...
https://www.dropbox.com/s/tuecdmul18csmr7/mUSIC%20mASTER%20rPG%20DeMo%20%28Updated%20Apr%202nd-15%29.zip?dl=0
My very first 'game'. There is a sequel actually 1/2 done that has 3 times the people, 3 times the music and a huge world/map ...