6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Nov 20, 2024 2:10 am

All times are UTC




Post new topic Reply to topic  [ 63 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Fri Nov 25, 2016 7:39 am 
Offline

Joined: Wed Jun 26, 2013 9:06 pm
Posts: 56
Some instructions I wish 65xx series had:

add/sub: add or subtract without carry
adx/ady/sbx/sby: add or subtract immediate to x or y
swx/swy/swa: swap x/y/a with memory
sxa/sya: swap x or y with a


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 25, 2016 7:51 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
How about reverse subtract? That can be handy.
(Edit: Also, and-not, aka bit clear)


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 25, 2016 9:56 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8542
Location: Southern California
Probably all of us imagine instructions we'd like to have, but I can also imagine good reasons they weren't included.

We do however have a relevant topic 6502 redundant, missed, and suggested features and links to other ones there.

_________________
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: Fri Nov 25, 2016 11:58 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1431
A BSR instruction would have been nice (PC relative subroutine call).

But the 65816 Opcode table already is pretty crowded, for implementing additional instructions there one maybe would have to use a prefix Byte...
what would increase complexity inside the CPU while not reducing code size.

If I had a time machine... I would try to find out what had happened to the 32 Bit 65832.


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 25, 2016 6:23 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8500
Location: Midwestern USA
ttlworks wrote:
A BSR instruction would have been nice (PC relative subroutine call).

The effect of BSR is readily synthesized on the 65C816 and can be added to an assembler's instruction set via a macro, such as the following Kowalski assembler code:

Code:
;   BSR: Branch to Subroutine
;   ——————————————————————————————————————————————————————————————————————
;   This macro synthesizes the BSR instruction implemented in the Motorola
;   6800 & 68000 microprocessors.  Programs in which subroutines are call-
;   ed via BSR are fully relocatable,  as the target address is calculated
;   relative to the program counter at run-time.   The target address must
;   be within the range of a long relative branch, +$7FFF or -$8000 bytes.
;   ——————————————————————————————————————————————————————————————————————
;
bsr      .macro .sr            ;BSR <addr>
.mib     =$82
.mip     =$62
.na      =*+3
.ra      .set .na+2
.ba      =.ra+1
.ra      .set .ra-.na
.ta      .set .sr-.ba
         .byte .mip,<.ra,>.ra,.mib,<.ta,>.ta
         .endm

What the above does is compute a return address and then assemble instructions that push the return address and do a long relative branch to the subroutine's entry address. Simple! :D Of course, it's slower than if BSR were implemented in hardware, but it's better than nothing.

The .set instruction generates an assembly-time variable, which unlike a normal symbol, e.g., .mib in the above, can be changed as assembly progresses. Most good assemblers have that capability.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 25, 2016 8:15 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
BigDumbDinosaur wrote:
Of course, it's slower than if BSR were implemented in hardware, but it's better than nothing.
Worthwhile, definitely! But the commenting is, shall we say, a little bare in spots. Are you deliberately being coy so as to tease us? 8) Not a peep about magic values like $82 and $62? All in good fun, regardless. :)

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 25, 2016 11:29 pm 
Offline

Joined: Fri Jun 03, 2016 3:42 am
Posts: 158
BigDumbDinosaur wrote:
It almost seems that for every argument that seeks to prove that close-in exposure to high frequency radiation will kill you/maim you/hurt your dog/wilt the flowers, etc., there is an opposing argument that proposes that it's all Chicken Little reaction to a theoretical risk.

During my service in the U.S. Navy, I was well aware of the dangers of direct exposure to the microwave output of radar sets, especially the radar used on gun directors, which operated at many gigahertz and was powerful enough to take out seagulls at hundreds of feet. However, these were sources operating at tens to hundreds of kilowatts of radiated power—the air search radar on our ship radiated 750 KW at full power! A modern cell phone's radiation is minuscule in comparison. Ditto for the output of wifi routers, medical telemetry systems (I've been on those a few times), and a host of other gadgets that generate and, by design, radiate RF energy. These devices, especially cell phones, have been commonplace since the 1990s, and a lot of data regarding radiation hazards has been gathered and analyzed.

At this time, I tend to brand it as a theoretical risk, as science has not been able to conclusively link daily exposure to low-level RF radiation with known health maladies. Extended studies done during the latter 1990s, especially in Sweden, where there was considerable concern about X-ray and other radiation emanating from the CRTs in radar 'scopes and large video monitors (both of which use very high secondary anode voltages to propel the electrons into the screen corners), failed to establish any link between said radiation and health issues. The conclusion was the radiation levels were too low to be a concern.

As Ed noted, there are bound to be exceptions in the population. However, they are sufficiently rare as to be dismissed as aberrations, not commonplace occurrences.

That book makes a good point that essentially all of the studies have been funded by power companies. Most of those studies are clearly setting out to prove that there is no health issue. All of those studies can be dismissed as bogus.

Our society has a huge investment in electrical power. If we can't have power lines, how will we get our electricity? If we can't have electricity, civilization will collapse. Realistically, nobody is going to step forward and say that there is a health issue.

barrym95838 wrote:
I think that I understand the gist of Garth's linked videos ... the documented hazard is not all about the intensity, but the combination of proximity, frequency, and pulse signature ... I say, as I light up my tenth cigarette of the day ... :-(

Mike B.

The effects are subtle. We are not talking about: "taking out seagulls at hundreds of feet." The book also says that prolonged exposure to low levels of EM pollution has more of an effect than short and intermittent exposure to high levels of EM pollution --- of course, prolonged exposure to high levels of EM pollution will seriously screw you up.

The symptoms are also not what you would expect intuitively. Food alergies are very common. Experiencing a metallic taste is common. Various kinds of hyper-sensitivity result. And, of course, there are hallucinations involving aliens. How is any of this going to be measured in a scientific study?

Also, having experienced an electrical shock will also result in similar symptoms afterwards, perhaps for the rest of your life. I know a guy who got hit by lightning while operating a track-hoe, and he still suffers from fasciculation years later.

The body uses electricity internally, and nobody really knows very much about how this works. It may be related to the qi. I have read a book on Qi Gong and I do exercises to relieve stress. I also go to an acupuncturist for some health issues I have. How are you going to measure qi in a scientific study? There is no way to measure voltage potentials or current flow inside of the body.

BTW: I doubt that cigarettes cause lung cancer. If you ask people why they smoke, they almost always say that nicotine relieves stress. This implies that they are stressed out, because otherwise why would they need something to relieve stress? It seems more likely to me that stress is what causes cancer --- cigarette smoking is a symptom, not a cause --- saying that cigarette smoking causes cancer is a false correllation.

barrym95838 wrote:
Hugh Aguilar wrote:
... The book was written in 1998, before cell phones were invented. He is mostly talking about power lines, television towers, ham-radio towers, etc ...

s/invented/ubiquitous/

Mike B.

You are right that cell phones had been invented in the 1990s, but weren't ubiquitous yet. My recollection of the 1990s is somewhat hazy --- all I remember are the billboards for "JJ the King of Beepers" (that, and the fact that I was working as a Forth programmer).

That book, "Electric UFOs," doesn't make any mention of cell phones.


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 25, 2016 11:43 pm 
Offline
User avatar

Joined: Sat Dec 07, 2013 4:32 pm
Posts: 246
Location: The Kettle Moraine
If long term exposure to high levels of RF were obviously harmful, we wouldn't have so many 80 year old retired microwave, television, and radio workers erecting antennas on field day. This is a topic frequently discussed in those circles.


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 26, 2016 2:04 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8542
Location: Southern California
KC9UDX wrote:
If long term exposure to high levels of RF were obviously harmful, we wouldn't have so many 80 year old retired microwave, television, and radio workers erecting antennas on field day. This is a topic frequently discussed in those circles.

I'm a ham too, and I wish there were no damage. Field day with your antenna way above the ground, especially at HF and not GHz frequencies, is not the same at all as having a cell phone on your body 16 hours every day which is always checking in with the cell site if not in active use. Admittedly, watching the lectures I posted links to takes time; but if you do watch them (I've seen no sign that anyone here has, except maybe Mike), you'll see the evidence is overwhelming, and that children and infants are the most vulnerable. For your own health and that of your families and especially children and grandchildren, please everyone, just watch the lectures, instead of discounting the possibility of harm without looking into it.

_________________
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: Sat Nov 26, 2016 3:43 am 
Offline

Joined: Fri Jun 03, 2016 3:42 am
Posts: 158
I am removing this message because it contains personal information that a stalker could use to find me.


Last edited by Hugh Aguilar on Sat Feb 04, 2017 6:12 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 26, 2016 5:21 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8500
Location: Midwestern USA
Dr Jefyll wrote:
BigDumbDinosaur wrote:
Of course, it's slower than if BSR were implemented in hardware, but it's better than nothing.
Worthwhile, definitely! But the commenting is, shall we say, a little bare in spots. Are you deliberately being coy so as to tease us? 8) Not a peep about magic values like $82 and $62? All in good fun, regardless. :)

Not coy. I usually don't comment my macros, as every expansion of the macro will regurgitate the comments into the listing file. $62 is the opcode for PER and $82 is the opcode for BRL. So what the macro does is assemble PER <return_addr>, followed by BRL <subroutine_addr>.

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 26, 2016 5:28 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8500
Location: Midwestern USA
Hugh Aguilar wrote:
You are right that cell phones had been invented in the 1990s...

Ahem, the technology is substantially older than that. Cell phones were already in use in the 1980s, having been in development since 1973 or thereabouts. In fact, my boss had a cell phone in 1987. It wasn't anything like a modern phone, more akin to an electrically powered brick with a whip antenna. :shock: You couldn't butt-dial it, because it was much too big to sit on. :lol:

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 26, 2016 7:05 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
Yeah, my boss had a Motorola 4500x in the late 80s:

Attachment:
Mobile-phone-history--007.jpg
Mobile-phone-history--007.jpg [ 31.67 KiB | Viewed 1041 times ]


I think I read somewhere that Elvis Presley had some kind of cell phone in his limo, and he died in the late 70s.

Mike B.


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 26, 2016 7:57 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8500
Location: Midwestern USA
barrym95838 wrote:
Yeah, my boss had a Motorola 4500x in the late 80s:

Attachment:
Mobile-phone-history--007.jpg

Yep! Electrically powered brick.

Quote:
I think I read somewhere that Elvis Presley had some kind of cell phone in his limo, and he died in the late 70s.

Car phones were developed in the 1960s when power semiconductors started to come down in price, making it possible to build a radio transmitter without a bucket-load of tubes. In the latter 1960s, Motorola had developed an almost-all solid-state taxicab and police radio that has something like a 30 mile range in good weather. That technology was subsequently adapted to mobile phones.

I recall around 1971 eating breakfast in a greasy spoon on Belmont Avenue in Chicago when a car right outside the door start blowing its horn in a regular pattern. It was the phone in the car "ringing." The car's owner ate every day in that greasy spoon and I just happened to be there when his phone "rang." :D

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 26, 2016 10:48 pm 
Offline

Joined: Fri Jun 03, 2016 3:42 am
Posts: 158
BigDumbDinosaur wrote:
Hugh Aguilar wrote:
You are right that cell phones had been invented in the 1990s...

Ahem, the technology is substantially older than that. Cell phones were already in use in the 1980s, having been in development since 1973 or thereabouts. In fact, my boss had a cell phone in 1987. It wasn't anything like a modern phone, more akin to an electrically powered brick with a whip antenna. :shock: You couldn't butt-dial it, because it was much too big to sit on. :lol:

I remember the Roger McGuinn song: "Car Phone." This came out in 1991. It had the lyric:
"He's talking on the car phone
from the driveway of his own home"
My recollection is that we had car phones in the 1990s, but we didn't have cell phones yet. Car phones were a status symbol --- that is why the guy was calling from his car phone in the driveway of his own home --- I didn't have one (I was working in a cabinet factory in Sacramento and listened to that song on the radio during lunch).

I've never actually seen a car phone. Weren't they mounted in the trunk? I remember the curly antenna sticking up behind the rear window of cars. They weren't held up to your head, which is where the EM-related health problems come from.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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: