[comp.emacs] UNIXPC emacs

krishna@msudoc.ee.mich-state.edu (Krishna Sethuraman) (08/20/87)

Does anyone have full-fledged 18.47 gnuemacs running (i.e., not microemacs)
on an at&t UNIXPC (i.e., the entry in the dist-18.47/src directory of m-7300.h)
If so, what's the sort of internal and external memory you need?
(I have 1 meg internal (~700 k free as per startup message) and a 20 meg drive)
?
Please reply to this soon, if you do at all, because I'm leaving in a few days 
and I have to do the installation in that time.

Krishna Sethuraman
krishna@athena.mit.edu
krishna@msudoc.egr.msu.edu
krishna@cemux1.cem.msu.edu
or thru netnews.  gyad knows I'm going to be checking it every hour for new information 0-)

mark@cogent.UUCP (Captain Neptune) (08/21/87)

In article <49@nancy.UUCP> krishna@msudoc.UUCP (=P^ZAZPPPYPYXU	zQYhBYPYo^O) writes:
>
>Does anyone have full-fledged 18.47 gnuemacs running (i.e., not microemacs)
>on an at&t UNIXPC (i.e., the entry in the dist-18.47/src directory of m-7300.h)

Please post responses to this question, as myself and others are also
interested.

p.s. net.gods, flame me all you want for this.  I don't care.  email chokes
     half the time and I want to know about this discussion.
-- 
##############################################################################
# Mark ###################### Ernie: Gee, Bert!  Where'd all your files go ? #
# Steven #################### Bert:  My files!  Er-r-r-r-r-r-rnie-e-e-e-e !! #
# Jeghers ########## {ihnp4,cbosgd,lll-lcc,lll-crg}|{dual,ptsfa}!cogent!mark #
##############################################################################
# Standard Disclaimer: Don't sue me.  Sue my company.  They have more money. #
##############################################################################

brant@linc.cis.upenn.edu (Brant Cheikes) (08/22/87)

Yes, I have a complete Gnu Emacs 18.47 up and happily running on a
Unix PC (aka 3B1).  RMS and friends have my everlasting admiration for
a fine piece of software that was probably the easiest large piece of
Unix software I've ever installed.

My configuration is 2M RAM + 40M disk.  The worst part of Gnu is the
amount of disk space it requires.  I've put together a "minimal"
distribution tar file (eliminating stuff for other machines, X-windows,
the TeX manual, etc) and that takes 6.5+Mb of disk (uncompressed), only
2.5 or so compressed.  You probably need on the order of 10Mb free to
build a new Gnu.  Once built, however, you can prune things down to
around 1.5Mb on disk (exec is about .5 Mb).  Sad thing is no one's
managed to hack it to use the shared library.

As for performance, Gnu takes about 20 sec to load on an empty 3B1, but
then runs as fast or faster than it does on my research VAX.  I suspect
that a 1Mb RAM system would be ok, but the increased paging might nail
performance.  The "ps" routine has frequently shown emacs taking 200+
memory blocks (though less than 30 in memory at a time, usually).

So, in summary, Gnu is alive and well on the 3B1.  If anyone wants
specific details about how you build it (the m-7300.h file isn't quite
right, esp. for v3.51 of the OS), contact me directly.
-----------------------------------------------------------------------------
Brant Cheikes                                      University of Pennsylvania
ARPA: brant@linc.cis.upenn.edu               Computer and Information Science
=============================================================================

eric@snark.UUCP (08/24/87)

In article <259@cogent.UUCP>, mark@cogent.UUCP (Captain Neptune) writes:
> >Does anyone have full-fledged 18.47 gnuemacs running (i.e., not microemacs)
> >on an at&t UNIXPC
> 
> Please post responses to this question, as myself and others are also
> interested.

O.K., here's how to do it.

-------------------------------snip,snip,snip--------------------------------
Version: 18.41
Environment: AT&T 3B1 running the 3.5 system set and development tools.

1) Configuration glitches:

I used "m-7300.h" and "s-5.2.h". I made the following modifications:

#undef ADDR_CORRECT   	/* simply to suppress "redefined" msg */

#define LD_SWITCH_MACHINE -s -N   /* permit unexec() to run properly */

#define SWITCH_ENUM_BUG           /* Some "bug"! */

2) Compilation glitches:

In unexec.c, the compiler's code generator gets confused by the expressions
used to compute bss_start and bss_end and generates incorrect assembler code.
Here is the fix. The NOSCREWUP code is the original.

446a447
> #ifdef NOSCREWUP
447a449,452
> #else
>   bss_end = ADDR_CORRECT(sbrk(0)) + pagemask;
>   bss_end &= ~pagemask;
> #endif
452c457,464
<       bss_start = (ADDR_CORRECT (bss_start) + pagemask) & ~pagemask;	      /* (Up) to page bdry. */
---
> 
>       /* (Up) to page bdry. */
> #ifdef NOSCREWUP
>       bss_start = (ADDR_CORRECT (bss_start) + pagemask) & ~pagemask;
> #else
>       bss_start = ADDR_CORRECT(bss_start) + pagemask;
>       bss_start &= ~pagemask;
> #endif

3) Lisp bogosities:

The lpr package needs some trivial munging to work on System V, where the
spooler is called 'lp'. The code should be conditional on the system-type
variable; I won't even bother with a diff, it's like a 2 line change.


And here's a terminal-support package for the AT&T 7300/3B1 console, which
calls itself an 's4' (Convergent Technology's original code name for the
machine was 'Safari 4').

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;; Map s4 function key escape sequences
;; into the standard slots in function-keymap where we can;
;; set up terminal-specific bindings where we must

(require 'keypad)

;; First, map as many keys as possible to terminal-independent keycaps

(defvar META-RB-map nil
  "The META-RB-map maps the ESC-[ function keys on the s4 keyboard.")

(if (not META-RB-map)
    (progn
     (setq META-RB-map (lookup-key global-map "\e["))
     (if (not (keymapp META-RB-map))
	 (setq META-RB-map (make-sparse-keymap)))  ;; <ESC>[ commands

     (setup-terminal-keymap META-RB-map
	    '(("A" . ?u)	   ; up arrow
	      ("B" . ?d)	   ; down-arrow
	      ("C" . ?r)	   ; right-arrow
	      ("D" . ?l)	   ; left-arrow
	      ("U" . ?N)	   ; 'Page' -> next page
	      ("V" . ?P)	   ; 'Shift-Page' -> prev page
	      ("H" . ?h)	   ; 'Home' -> home-key
	;;    ("J" . ??)	   ; 'Clear' -> unmapped
	))))

(defun enable-arrow-keys ()
  "Enable the use of the s4 arrow keys for cursor motion.
Because of the nature of the s4, this unavoidably breaks
the standard Emacs command ESC [; therefore, it is not done by default,
but only if you give this command in your .emacs."
  (global-set-key "\e[" META-RB-map))

(defvar META-N-map nil
  "META-N-map maps the ESC-N function keys on the s4 keyboard.")

(if (not META-N-map)
    (progn

     (setq META-N-map (lookup-key global-map "\eN"))
     (if (not (keymapp META-N-map))
	 (setq META-N-map (make-sparse-keymap)))  ;; <ESC>N commands
     (setup-terminal-keymap META-N-map '(
		("a" . ?C)	; 'Rfrsh' -> redraw screen
	;;	("A" . ??)	; 'Clear' -> unmapped
	;;	("c" . ??)	; 'Move' -> unmapped
	;;	("d" . ??)	; 'Copy' -> unmapped
	;;	("B" . ??)	; 'Shift-Beg' -> unmapped
	;;	("M" . ??)	; 'Shift-Home' -> unmapped
	;;	("N" . ??)	; 'Shift-End' -> unmapped
		("e" . ?k)	; 'Dlete' -> generic delete (kill-region)
		("f" . ?.)	; 'Dlete Char' -> keypad .
		("g" . ?1)	; 'Prev' -> keypad 1 (backward-word)
		("h" . ?3)	; 'Next' -> keypad 3 (forward-word)
		("i" . ?s)	; 'Mark' -> select
	;;	("I" . ??)	; 'Select' -> MAPPED BELOW
	;;	("j" . ??)	; 'Input Mode' -> unmapped
	))

     (define-key global-map "\eN" META-N-map)))

(defvar META-O-map nil
  "META-O-map maps the META-O function keys on the s4 keyboard.")

(if (not META-O-map)
    (progn

     (setq META-O-map (lookup-key global-map "\eO"))
     (if (not (keymapp META-O-map))
	 (setq META-O-map (make-sparse-keymap)))  ;; <ESC>O commands
     (setup-terminal-keymap META-O-map '(
		("a" . ?E)	; 'Clear-Line' -> Clear to EOL
		("A" . ?S)	; 'Shift-Clear-Line' -> Clear to EOS
		("b" . ?\C-@)	; 'Ref' -> function key 0
		("c" . ?\C-a)	; 'F1' -> function key 1
		("d" . ?\C-b)	; 'F2' -> function key 2
		("e" . ?\C-c)	; 'F3' -> function key 3
		("f" . ?\C-d)	; 'F4' -> function key 4
		("g" . ?\C-e)	; 'F5' -> function key 5
		("h" . ?\C-f)	; 'F6' -> function key 6
		("i" . ?\C-g)	; 'F7' -> function key 7
		("j" . ?\C-h)	; 'F8' -> function key 8
	;;	("k" . ??)	; 'Exit' -> MAPPED BELOW
		("m" . ??)	; 'Help' -> help-command
	;;	("n" . ??)	; 'Creat' -> unmapped
	;;	("o" . ??)	; 'Save' -> MAPPED BELOW
	;;	("r" . ??)	; 'Opts' -> unmapped
	;;	("s" . ??)	; 'Undo' -> MAPPED BELOW
		("t" . ?x)	; 'Redo' -> 'do' key
	;;	("u" . ??)	; 'Cmd' -> MAPPED BELOW
	;;	("v" . ??)	; 'Open' -> MAPPED BELOW
	;;	("V" . ??)	; 'Close' -> unmapped
	;;	("w" . ??)	; 'Cancel' -> MAPPED BELOW
		("x" . ?f)	; 'Find' -> find/replace
	;;	("y" . ??)	; 'Rplac' -> MAPPED BELOW
	;;	("z" . ??)	; 'Print' -> MAPPED BELOW
	))

     (define-key global-map "\eO" META-O-map)))

(defvar META-P-map nil
  "META-P-map maps the META-P function keys on the s4 keyboard.")

(if (not META-P-map)
    (progn

     (setq META-P-map (lookup-key global-map "\eP"))
     (if (not (keymapp META-P-map))
	 (setq META-P-map (make-sparse-keymap)))  ;; <ESC>P commands
     (setup-terminal-keymap META-P-map '(
		("a" . ?1)	; Ctrl-1 -> keypad 1
		("b" . ?2)	; Ctrl-2 -> keypad 2
		("c" . ?3)	; Ctrl-3 -> keypad 3
		("d" . ?4)	; Ctrl-4 -> keypad 4
		("e" . ?5)	; Ctrl-5 -> keypad 5
		("f" . ?6)	; Ctrl-6 -> keypad 6
		("g" . ?7)	; Ctrl-7 -> keypad 7
		("h" . ?8)	; Ctrl-8 -> keypad 8
		("i" . ?9)	; Ctrl-9 -> keypad 9
		("j" . ?0)	; Ctrl-0 -> keypad 0
		("k" . ?-)	; Ctrl-- -> keypad -
	))

     (define-key global-map "\eP" META-P-map)))

;; Now do terminal-specific mappings of keys with no standard-keycap equivalent

(define-key esc-map "9" 'beginning-of-buffer)		;'Begin'
(define-key esc-map "0" 'end-of-buffer)			;'End'
(define-key META-N-map "I" 'narrow-region)		;'Select'
(define-key META-O-map "k" 'save-buffers-kill-emacs)	;'Exit'
(define-key META-O-map "o" 'save-buffer)		;'Save'
(define-key META-O-map "s" 'undo)			;'Undo'
(define-key META-O-map "u" 'execute-extended-command)	;'Cmd'
(define-key META-O-map "v" 'find-file)			;'Open'
(define-key META-O-map "w" 'keyboard-quit)		;'Cancl'
(define-key META-O-map "y" 'regexp-replace)		;'Rplac'
(define-key META-O-map "z" 'lpr-buffer)			;'Print'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-------------------------------snip,snip,snip--------------------------------

      Eric S. Raymond
      UUCP:  {{seismo,ihnp4,rutgers}!cbmvax,sdcrdcf!burdvax,vu-vlsi}!snark!eric
      Post:  22 South Warren Avenue, Malvern, PA 19355    Phone: (215)-296-5718
-- 
      Eric S. Raymond
      UUCP:  {{seismo,ihnp4,rutgers}!cbmvax,sdcrdcf!burdvax,vu-vlsi}!snark!eric
      Post:  22 South Warren Avenue, Malvern, PA 19355    Phone: (215)-296-5718