6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Sep 25, 2024 9:15 am

All times are UTC




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Sun Jan 24, 2021 5:09 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
I tried to build, but didn't quite make it. I've contacted the owner of a fork on their Github issue. (Tragically, Andrew passed away earlier this month, so we will need third-party assistance. It would be great to have this project of his available as a runnable release.)


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 24, 2021 5:27 pm 
Offline

Joined: Wed Jan 13, 2021 5:05 pm
Posts: 7
Oh my goodness, that's terrible. I had no idea. I've benefitted considerably from his work in both hardware and software, which he gave to the public so generously.

My condolences to his family and friends. A really sad loss to all of those who interacted with him here.


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 10, 2021 10:47 pm 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
Oh-Two wrote:
I've downloaded Andrew Jacob's Dev65 assembler...But I can't figure out how to run it!
This is entirely unrelated to the topic of this thread, so perhaps you could repost your query as the start of a new thread? (I suggest copying the contents of your post here to a new post and editing the one here to point to it.)

I don't mind helping out with some answers, but there's likely to be a lot of back-and-forth that will not be of any interest at all to many readers of this thread.

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 21, 2021 6:08 am 
Offline

Joined: Sat Aug 21, 2021 5:30 am
Posts: 2
Location: Columbus, Ohio USA
BigEd wrote:
I tried to build, but didn't quite make it. I've contacted the owner of a fork on their Github issue. (Tragically, Andrew passed away earlier this month, so we will need third-party assistance. It would be great to have this project of his available as a runnable release.)


I'm the owner of the fork. I will create a buildable version and a runnable release. Sorry to hear about Andrew. That is a terrible loss.


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 21, 2021 5:40 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
Not sure it's something everyone should be using, but personally i added some alternative instruction mnemonics to make them more readable.
specifically for INC, DEC, CL*, SE*, PH*, and PL*
examples:
Code:
PHA
PLP
CLC
INX
DEY
SEI
etc

can be turned into:
Code:
PSH A
PLL P
CLR C
INC X
DEC Y
SET I
etc

it's especially noticable with the NotePad++ highlighting i'm using for Assembly:
Attachment:
notepad++_2021-08-21_23-13-31.png
notepad++_2021-08-21_23-13-31.png [ 22.71 KiB | Viewed 827 times ]

I also got the good old "ADD" and "SUB" Pseudo Instructions which assemble into "CLC ADC" and "SEC SBC" respectively.

and just for fun, and becuase i often hear people compare the Zeropage to a RISC CPU's Register File i added a bunch of RISC-like instructions that actually use the Zeropage as it's Register file. it also predefines some constants so you can use R0-R255 to refer to decimal 0-255, making the RISC Experience even more immersive!
Attachment:
notepad++_2021-08-21_23-08-52.png
notepad++_2021-08-21_23-08-52.png [ 53.52 KiB | Viewed 827 times ]

maybe one day i'll make a 65C02 FPGA Core around this idea.


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 21, 2021 10:02 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1041
Location: near Heidelberg, Germany
Agumander wrote:
One assembler feature I've been wondering exists anywhere is using "{" as label to the next instance of "}", with the ability to nest them.
(It could be some other pair of demarcating characters, those are just the first I think of as a C guy)
This would save me from having to come up with unique label names, or avoid bugs that happen if i miscount bytes when writing BEQ *+n
Had this happen on my current project when I forgot that one of my named memory locations wasn't actually zero page. Oops!


You mean like the .( and .) Block pseudo opcodes of xa65? Ca65 has similar functionality just can't remember right now the names

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 22, 2021 1:59 am 
Offline

Joined: Thu Mar 12, 2020 10:04 pm
Posts: 702
Location: North Tejas
Proxy wrote:
Not sure it's something everyone should be using, but personally i added some alternative instruction mnemonics to make them more readable.


If your assembler does not supply them, define the following aliases:

BLO for BCC
BHS for LCS

Code:
    cmp     #Value
    blo     Label


is more obvious than

Code:
    cmp     #Value
    bcc     Label


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 22, 2021 2:30 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8517
Location: Southern California
BillG wrote:
is more obvious than

I guess I need some interpretation. BLO looks like "below;" but then BHS should be something like "Same as or above," but it doesn't look anything like that. Whatever it is, it's certainly not obvious. And what is LCS? I can't think of what that might be. Again, definitely not obvious. The aliases I've seen are BLT (branch if less than) for BCC, and BGE (branch if greater than or equal).

Edit, addition: In my program flow-control structure macros, what I would do for the CMP #value, BCC <label> is something like:
Code:
        CMP  #value
        IF_GE             ; If it was greater than or equal to the value,
            <do_stuff>    ; do this stuff.
            <do_stuff>
        END_IF

and the IF_GE assembles the BCC down to the END_IF. It leaves a dummy byte for the branch distance, and that byte gets filled in by the END_IF later when it is encountered during assembly. No label is needed. These are nestable too, with more structures of the same or different kind.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 22, 2021 2:35 am 
Offline

Joined: Thu Mar 12, 2020 10:04 pm
Posts: 702
Location: North Tejas
These are from the Motorola instruction sets.

BLT, BLE, BGT, BGE are for use after signed comparision.

BLO (LOwer), BLS (Lower or Same), BHI (Higher) and BHS (Higher or Same) are the unsigned counterparts.

MOS may not have adopted those out of "copyright" concerns.


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 22, 2021 2:44 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8517
Location: Southern California
Ah, that makes sense, although require a small amount of learning if one has not come from the other processors. I added to my post above while you were posting.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 22, 2021 2:58 am 
Offline

Joined: Thu Mar 12, 2020 10:04 pm
Posts: 702
Location: North Tejas
GARTHWILSON wrote:
In my program flow-control structure macros, what I would do for the CMP #value, BCC <label> is something like:
Code:
        CMP  #value
        IF_GE             ; If it was greater than or equal to the value,
            <do_stuff>    ; do this stuff.
            <do_stuff>
        END_IF

and the IF_GE assembles the BCC down to the END_IF. It leaves a dummy byte for the branch distance, and that byte gets filled in by the END_IF later when it is encountered during assembly. No label is needed. These are nestable too, with more structures of the same or different kind.[/color]


You still have the signed vs unsigned conundrum. Is GE signed or unsigned?

You can choose different phrases or add a suffix: GES and GEU


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 22, 2021 3:29 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8517
Location: Southern California
For that, I think your signed comparison with the EOR #$80's would come before the IF, like the CMP above comes before the IF. I don't think I have ever done signed for 8-bit numbers though, only 16 or more.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 22, 2021 4:23 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8395
Location: Midwestern USA
BillG wrote:
MOS may not have adopted those out of "copyright" concerns.

More likely, they didn't adopt them because the 6502 didn't have a direct equivalent for any of them. As part of the cost reduction done by Chuck Peddle and company, instructions were removed that could be synthesized with short sequences of other instructions.

I personally have never had a need for instruction aliases. To me, it's just more junk to learn. :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 22, 2021 4:53 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8395
Location: Midwestern USA
Getting back on topic, a macro I use a lot in 65C816 programming is one that generates a stack frame when given a list of parameters:

Code:
;   generate stack frame from words...
;
pushparm .macro ...            ;accepts an arbitrary number of parameters
         .if %0                ;if at least 1 parameter...
.i           .set 0            ;initialize parameter index
             .rept %0          ;repeat for number of parameters
.i               .= .i+1
                 pea #%.i      ;push parameter as a word
             .endr             ;end of repeated block
             pea #.i           ;push number of words in frame
         .else
             .error "error: macro syntax: "+%0$+" param1[,param2[,param3]] ..."
         .endif
         .endm

The above is for the Kowalski assembler. The leftmost parameter in the macro invocation will be at the top of the stack frame. The lowest word on the stack, that is, the word at SP+1, will be a count of the total words in the frame, not including the count itself.

The %0$ variable is the macro's name. Should the macro be invoked without any parameters, the message...

    error: macro syntax: pushparm param1[,param2[,param3]] ...

...will be displayed and assembly will halt.

I've found in 65C816 programming that "long" addresses are better handled as 32-bit quantities instead of 24 bits, especially if pointer arithmetic will be involved. The problem is how to push a 32-bit pointer given a 16- or 24-bit address. In the Kowalski assembler, that's easy. For example, to push two 32-bit pointers, the macro would be invoked as follows:

Code:
         pushparm ptr1 >> 16, ptr1 & $FFFF, ptr2 >> 16, ptr2 & $FFFF

The >> 16 notation is a 16-bit right-shift and & $FFFF is a logical AND that masks bits 16-31.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 25, 2021 3:28 am 
Offline

Joined: Sat Aug 21, 2021 5:30 am
Posts: 2
Location: Columbus, Ohio USA
Gungwald wrote:
BigEd wrote:
I tried to build, but didn't quite make it. I've contacted the owner of a fork on their Github issue. (Tragically, Andrew passed away earlier this month, so we will need third-party assistance. It would be great to have this project of his available as a runnable release.)


I'm the owner of the fork. I will create a buildable version and a runnable release. Sorry to hear about Andrew. That is a terrible loss.


I have created a release of the dev65 assembler that includes an installable binary. I've made it as easy as possible to install on Linux, Mac, and Windows. I wanted to support my Mac G4 but unfortunately this version requires Java 1.6 or greater. The current version of Java is Java 11. If you have that, you're good. Yes, Java version numbering is stupid. If you're still using Java 8, like so many companies are today, it's time to move on.

Download installer

If you have trouble, open an issue and I'll fix it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: