From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Emacs history, and "Is Emacs difficult to learn?" Date: Thu, 01 Aug 2013 12:44:06 -0400 Message-ID: References: <87y58pplcp.fsf@VLAN-3434.student.uu.se> <87fvuwgsv0.fsf@VLAN-3434.student.uu.se> <075751cf-97a3-4d01-8fb1-4ffbc0180f3f@googlegroups.com> <878v0oxfdw.fsf@VLAN-3434.student.uu.se> <87a9l4rs76.fsf@VLAN-3434.student.uu.se> <39e6407d-c4fd-4dc1-b47f-a1ba4119c7cb@googlegroups.com> <87iozqzjjq.fsf@VLAN-3434.student.uu.se> <871u6dpjar.fsf@VLAN-3434.student.uu.se> <14bebcfe-2311-4bb3-8154-4cc803962c71@googlegroups.com> <6be5c9a9-ba78-4169-8020-aa9e4c30a759@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375375957 19298 80.91.229.3 (1 Aug 2013 16:52:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Aug 2013 16:52:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 01 18:52:37 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V4w7A-0006PE-45 for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Aug 2013 18:52:36 +0200 Original-Received: from localhost ([::1]:33172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4w79-0000Vj-QU for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Aug 2013 12:52:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4w6r-0000UF-1N for help-gnu-emacs@gnu.org; Thu, 01 Aug 2013 12:52:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4w6h-0005uU-KC for help-gnu-emacs@gnu.org; Thu, 01 Aug 2013 12:52:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:50831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4vzP-0003If-FG for help-gnu-emacs@gnu.org; Thu, 01 Aug 2013 12:44:35 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V4vzL-0004wC-JV for help-gnu-emacs@gnu.org; Thu, 01 Aug 2013 18:44:31 +0200 Original-Received: from 184.175.13.230 ([184.175.13.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Aug 2013 18:44:31 +0200 Original-Received: from monnier by 184.175.13.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Aug 2013 18:44:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 184.175.13.230 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:ofqJJwCfEsJ1Z98FO2IBaA7OzP4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92636 Archived-At: > b. If you are saying jumping into the middle of an instruction can be > useful, well I confess this is beyond my ken. For one I believe that in > assembly alone with arithmetic on the location-counter that should be > possible. On the other hand I dont know how to do that without getting into > undefined instruction issues. You can do it in assembly, just like you an do it in C: by making assumptions about how the compiler/assembler works. But yes, jumping in the middle of an instruction can be useful, if the "tail" of the byte-sequence encoding that instruction "happens" to be a valid instruction. E.g. back in the 68000, to skip a 4B instruction you could either use a jump, or (more efficient) place that 4B instruction in the "immediate constant" part of a CMP (compare) instruction whose result you just don't use (i.e. this CMP instruction was just used as a 6B no-op whose last 4B was free for you to choose as you please). Other things you can't do in assembly (without again making assumptions about the way the assembler works, i.e. going down to machine code) is to self-modify the code. Or to use some of the instruction bytes as data-constants (in case they happen to contain the same bit-pattern). Stefan