Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107047

Re: How to XOR a byte output?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Newsgroups comp.lang.python
Subject Re: How to XOR a byte output?
Date Fri, 15 Apr 2016 08:06:45 -0400
Organization IISS Elusive Unicorn
Lines 47
Message-ID <mailman.16.1460722005.6324.python-list@python.org> (permalink)
References <87potssg4n.fsf@elektro.pacujo.net> <1973741114.867178.1460675103346.JavaMail.yahoo@mail.yahoo.com> <f0l1hbp5ar1g32n66j7td6e5hnuvnotk7e@4ax.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de Ih7/VJbQfeaxLpEA4bQMSQ4vp2SwBRE0B2ovbCR1rJzA==
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '(python': 0.05; 'executable': 0.07; 'interpreted': 0.07; 'subject:How': 0.09; 'c/c++': 0.09; 'interpreter,': 0.09; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'thread': 0.10; 'advance': 0.10; 'python': 0.10; 'interpreter': 0.15; 'thu,': 0.15; '(python)': 0.16; '(xor': 0.16; '2016': 0.16; 'chip': 0.16; 'consume': 0.16; 'itself).': 0.16; 'processors': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'thread.': 0.16; 'memory': 0.17; 'byte': 0.18; 'processor': 0.18; 'url:home': 0.18; '(in': 0.18; 'language': 0.19; 'load': 0.20; '(not': 0.20; 'library': 0.20; "aren't": 0.22; 'arm': 0.22; 'interpret': 0.22; 'produces': 0.22; 'programming': 0.22; 'nearly': 0.23; 'unlike': 0.23; 'wondering': 0.25; "doesn't": 0.26; 'header:X-Complaints-To:1': 0.26; 'chris': 0.26; '+0000': 0.27; 'equivalent': 0.27; 'question': 0.27; 'sequence': 0.27; '32-bit': 0.29; 'assembly': 0.29; 'loads': 0.29; 'thread,': 0.29; 'windows,': 0.29; 'starts': 0.29; 'typically': 0.29; 'code': 0.30; 'mention': 0.30; 'anyone': 0.32; 'core': 0.32; 'implement': 0.32; 'compiled': 0.32; 'language.': 0.32; 'run': 0.33; 'point': 0.33; 'file': 0.34; 'running': 0.34; 'add': 0.34; 'list': 0.34; 'gives': 0.35; 'could': 0.35; 'newer': 0.35; 'level': 0.35; 'but': 0.36; 'list,': 0.36; 'should': 0.36; 'instead': 0.36; 'there': 0.36; 'created': 0.36; 'basic': 0.36; 'alone': 0.36; 'loaded': 0.36; 'modules': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'received:org': 0.37; 'charset :us-ascii': 0.37; 'things': 0.38; 'means': 0.39; 'does': 0.39; 'application': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'space': 0.40; 'some': 0.40; 'your': 0.60; 'entire': 0.61; 'black': 0.61; 'programs': 0.62; 'more': 0.63; 'believe': 0.66; 'python-list': 0.66; 'cards': 0.67; 'flash': 0.67; 'direct': 0.68; 'subject': 0.70; '(utc),': 0.84; 'devices.': 0.84; 'dennis': 0.91; 'stamp': 0.91; 'received:108': 0.93
X-Injected-Via-Gmane http://gmane.org/
X-Gmane-NNTP-Posting-Host adsl-108-73-119-88.dsl.klmzmi.sbcglobal.net
X-Newsreader Forte Agent 6.00/32.1186
X-No-Archive YES
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <f0l1hbp5ar1g32n66j7td6e5hnuvnotk7e@4ax.com>
X-Mailman-Original-References <87potssg4n.fsf@elektro.pacujo.net> <1973741114.867178.1460675103346.JavaMail.yahoo@mail.yahoo.com>
Xref csiph.com comp.lang.python:107047

Show key headers only | View raw


On Thu, 14 Apr 2016 23:05:03 +0000 (UTC), Chris Juried via Python-list
<python-list@python.org> declaimed the following:

>Hello list,
>I am new to the list and was wondering if anyone is using Python for MCU programing? In particular the 

	First matter: You should have created a new thread, rather than
piggy-backing on an existing thread. Your question has nothing to do with
the thread subject (XOR a byte).

>AVR and ARM based controllers. Is Python a plausible language for MCU programming or is C/C++ or Assembly the only way to go? Thanks in advance for your insight.

	Most implementations of Python are of a byte-code interpreted language.
It does not produce native executable binaries. That means that to use it
on those microcontrollers you would have to first port the interpreter to
the controller. That alone may consume the entire FLASH memory space --
even before you add library modules to access the hardware (Python doesn't
"do" hardware level access -- there is no "pointer to memory" you can set
to write to pins). The core of the interpreter, for 32-bit Windows, is
nearly 300KB -- more than the 256KB available on a TIVA TM4C123 Launchpad.
You'd then need to implement a file system so the interpreter could locate
and load library modules used by your program (not to mention the program
itself).

	At that point you've created the Python equivalent of the old Parallax
BASIC Stamp (in which the MCU FLASH is loaded with the interpreter of a
very limited BASIC, and off-chip memory is used to hold the pre-compiled
byte code of your program). Or the newer Parallax Propeller chip -- in
which the boot sequence loads a very short interpreter for the SPIN
language into the processor core from off-chip memory before it starts to
interpret byte-codes. Though unlike the BASIC Stamp, the Propeller also
gives you access to assembly (assembly programs get loaded into the core
memory instead of the interpreter -- so run much faster).

	You can run it (Python) on things like the BeagleBone Black and
Raspberry PI -- but those cards are using application SoC processors
running a form of Linux; they aren't running bare-bones direct hardware
access.

	For microcontrollers, you typically need to have a compiled language
that produces a memory image that can execute in place. It may not be C/C++
-- I believe a few efforts have been made for a no-run-time GNAT Ada to run
on some ARM devices.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-13 06:18 -0700
  Re: How to XOR a byte output? Chris Angelico <rosuav@gmail.com> - 2016-04-13 23:29 +1000
    Re: How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-13 06:51 -0700
      Re: How to XOR a byte output? Chris Angelico <rosuav@gmail.com> - 2016-04-14 00:31 +1000
      Re: How to XOR a byte output? Stephen Hansen <me+python@ixokai.io> - 2016-04-13 08:33 -0700
    Re: How to XOR a byte output? Marko Rauhamaa <marko@pacujo.net> - 2016-04-13 17:27 +0300
      Re: How to XOR a byte output? Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-13 09:30 -0600
      Re: How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-14 01:49 -0700
        Re: How to XOR a byte output? Peter Otten <__peter__@web.de> - 2016-04-14 11:16 +0200
        Re: How to XOR a byte output? Marko Rauhamaa <marko@pacujo.net> - 2016-04-14 12:18 +0300
          Re: How to XOR a byte output? Chris Juried <cjuried@yahoo.com> - 2016-04-14 23:05 +0000
          Re: How to XOR a byte output? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-15 08:06 -0400
  Re: How to XOR a byte output? alister <alister.ware@ntlworld.com> - 2016-04-13 16:15 +0000
    [OT] A doubt about a doubt, was Re: How to XOR a byte output? Peter Otten <__peter__@web.de> - 2016-04-13 18:59 +0200
      Re: [OT] A doubt about a doubt, was Re: How to XOR a byte output? Rustom Mody <rustompmody@gmail.com> - 2016-04-13 18:54 -0700
        Re: [OT] A doubt about a doubt Peter Otten <__peter__@web.de> - 2016-04-14 14:26 +0200
  Re: How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-14 01:32 -0700
  Re: How to XOR a byte output? durgadevi1 <srirajarajeswaridevikrupa@gmail.com> - 2016-04-15 04:46 -0700

csiph-web