element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Code Exchange
  • Technologies
  • More
Code Exchange
Forum Can anyone tell me what code this is?
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Code Exchange to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 15 replies
  • Answers 2 answers
  • Subscribers 50 subscribers
  • Views 4242 views
  • Users 0 members are here
  • Code Exchange
Related

Can anyone tell me what code this is?

clem57
clem57 over 10 years ago

This is a quiz of sorts. I wish to know

  1. what microprocessor uses these instructions
  2. who makes it
  3. what does it do

 

0000 90      GHI 0  
0001 B6      PHI 6
0002 F829    LDI DOIT 
0004 A6      PLO 6
0005 E0      SEX 0  
0006 6400    OUT 4,00  
0009 3F09    BN4 * 
000B 6C      INP 4  
000C 64      OUT 4  
000D 370D    B4 *  
000F F860    LDI #60  
0011 A6      PLO 6  
0012 E0      SEX 0  
0013 6401    OUT 4,01
0015 3F15    BN4 *
0017 E6      SEX 6  
0018 6C      INP 4  
0019 64      OUT 4  
001A 371A    B4 *
001C E0      SEX 0  
001D 6402    OUT 4,02
001F E6      SEX 6
0020 3F20 LOOP: BN4 * 
0022 6C      INP 4  
0023 64      OUT 4  
0024 3724    B4 * 
0026 26      DEC 6  
0027 26      DEC 6
0028 46      LDA 6  
0029 C4 DOIT: NOP  
002A C4      NOP  
002B 26      DEC 6   
002C 56      STR 6 
002D 64      OUT 4  
002E 7A      REQ  
002F CA0020  LBNZ LOOP  
0032 7B      SEQ  
0033 3020    BR LOOP 

  • Sign in to reply
  • Cancel

Top Replies

  • johnbeetem
    johnbeetem over 10 years ago +2 verified
    There's only one microprocessor I know of that has a SEX instruction. It was the first CMOS microprocessor and was produced by the company that pioneered CMOS. The company originally called it COS/MOS…
  • michaelkellett
    michaelkellett over 10 years ago +2 suggested
    Much too easy - just Google the first 5 lines of code. I considered using one a long time ago but we never did - Motorola brought out a CMOS 6805 just in time. MK.
  • gdstew
    gdstew over 10 years ago in reply to johnbeetem +1
    Without looking I do at least know which one the COS/MOS processor is, having never used it I did not recognize the code. The Motorola 6809 processor also has a sex (sign extend) instruction and it has…
  • johnbeetem
    0 johnbeetem over 10 years ago

    There's only one microprocessor I know of that has a SEX instruction.  It was the first CMOS microprocessor and was produced by the company that pioneered CMOS.  The company originally called it COS/MOS: COmplementary-Symmetry Metal-Oxide Semiconductor.

     

    To avoid spoiling the game for others, I won't name the company or processor.  But I found it quickly at Wikipedia, and the page has your assembly language listing image

     

    I can't believe I still remember that chip.  It's not like I ever used it.  IIRC I looked at the instruction set and found it pretty ugly.  I think its chief advantage was that COS/MOS could be powered from 3V to 15V, so the "SEX machine" was a good fit for industrial applications where you needed really wide noise margins.  COS/MOS was also really low power, drawing next to nothing at low frequencies.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • gdstew
    0 gdstew over 10 years ago in reply to johnbeetem

    Without looking I do at least know which one the COS/MOS processor is, having never used it I did not recognize the code.

     

    The Motorola 6809 processor also has a sex (sign extend) instruction and it has a bra (branch always) instruction too.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 10 years ago

    Much too easy - just Google the first 5 lines of code.

     

    I considered using one a long time ago but we never did - Motorola brought out a CMOS 6805 just in time.

     

    MK.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • johnbeetem
    0 johnbeetem over 10 years ago

    Hey clem57, how did you come across the "SEX Machine?"  It's a pretty obscure chip.

     

    What's next, a quiz about the National 32008?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Capper
    0 Capper over 10 years ago

    Intersil semiconductor

    CDP1802

     

    ..  TEST ALU OPS

    0000 90         GHI 0     .. SET UP R6

    0001 B6         PHI 6

    0002 F829       LDI DOIT  .. FOR INPUT OF OPCODE

    0004 A6         PLO 6

    0005 E0         SEX 0     .. (X=0 ALREADY)

    0006 6400       OUT 4,00  .. ANNOUNCE US READY

    0008 E6         SEX 6     .. NOW X=6

    0009 3F09       BN4 *     .. WAIT FOR IT

    000B 6C         INP 4     .. OK, GET IT

    000C 64         OUT 4     .. AND ECHO TO DISPLAY

    000D 370D       B4 *      .. WAIT FOR RELEASE

    000F F860       LDI #60   .. NOW GET READY FOR

    0011 A6         PLO 6     .. FIRST OPERAND

    0012 E0         SEX 0     .. SAY SO

    0013 6401       OUT 4,01

    0015 3F15       BN4 *

    0017 E6         SEX 6     .. TAKE IT IN AND ECHO

    0018 6C         INP 4     .. (TO 0060)

    0019 64         OUT 4     .. (ALSO INCREMENT R6)

    001A 371A       B4 *

    001C E0         SEX 0     .. DITTO SECOND OPERAND

    001D 6402       OUT 4,02

    001F E6         SEX 6

    0020 3F20 LOOP: BN4 *     .. WAIT FOR IT

    0022 6C         INP 4     .. GET IT (NOTE: X=6)

    0023 64         OUT 4     .. ECHO IT

    0024 3724       B4 *      .. WAIT FOR RELEASE

    0026 26         DEC 6     .. BACK UP R6 TO 0060

    0027 26         DEC 6

    0028 46         LDA 6     .. GET 1ST OPERAND TO D

    0029 C4   DOIT: NOP       .. DO OPERATION

    002A C4         NOP       .. (SPARE)

    002B 26         DEC 6     .. BACK TO 0060

    002C 56         STR 6     .. OUTPUT RESULT

    002D 64         OUT 4     .. (X=6 STILL)

    002E 7A         REQ       .. TURN OFF Q

    002F CA0020     LBNZ LOOP .. THEN IF ZERO,

    0032 7B         SEQ       .. TURN IT ON AGAIN

    0033 3020       BR LOOP   .. REPEAT IN ANY CASE

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to johnbeetem

    I was browsing RCA and came across this on a list of things they did.

    Clem

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago

    From Wikipedia for 4000 series

    • They were introduced by RCA as CD4000 COS/MOS series in 1968
    • COSMOS, standing for COmplementary Symmetry Metal-Oxide Semiconductor
    • 4000 series parts have the advantage of lower power consumption
    • Wider range of supply voltages (3 V to 15 V)
    • Although all semiconductors can be damaged by electrostatic discharge, the high impedance of CMOS inputs makes them more susceptible than bipolar transistor-based, TTL, devices
    • The 4000 series integrated circuits have been used in space satellites for many decades!

    4511 pinout

    Answers:

    1. 4000 series
    2. RCA
    3. Test Alu Ops.

     

    Since johnbeetem was first he gets the prize, with honorable mention for Capper

    Ribbon 1st Place Photo Sculptures                                                                           image

     

    Thanks to all,

    Clem

     

    P.S. If you like this, I could be persuaded to do this weekly.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to clem57

    Another reference https://en.wikipedia.org/wiki/RCA_1802

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • screamingtiger
    0 screamingtiger over 10 years ago

    What a great idea!  Put a SEX instruction and everyone will remember your processor forever!

    I'll spare you my ideas for other 3 letter instructions that would also be memorable...

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • johnbeetem
    0 johnbeetem over 10 years ago in reply to screamingtiger

    Joey Thompson wrote:

     

    What a great idea!  Put a SEX instruction and everyone will remember your processor forever!

    I'll spare you my ideas for other 3 letter instructions that would also be memorable...

    IMO the only people likely to remember COSMAC for the SEX instruction are those who were at an impressionable age when it was released, and were avid assembly language programmers.  Given how little ASM is used these days, clever mnemonics aren't liable to get much traction any more.  My favorite from more recent processors is PowerPC's "eieio" instruction (Enforce In-order Execution of I/O).  I can't think of any particularly memorable ARM mnemonics.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube