Is it a lost cause?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
The Raspberry Pi in all its invocations was conceived as a filip
for education about computer systems but looking at some of the
recent posts in these NGs, it seems to have got stuck in a blind alley;
the alley of Linux, whereas the real education about computers and
how they work is down at a much lower level.

This lamentable state of affairs seems to be extant in recent so-called
"computer science" graduates who have no inkling about how a computer
works and could not design from scratch themselves a computer because  
thinking,
as they do, that the world of computing is made up from Linux, C and C++.

An acadaemic education should not be about current commercial convenience
lest you end up with degrees with no acadaemic characteristics such as  
sports
science and tourism management.



Re: Is it a lost cause?
On Mon, 13 Jun 2016 19:32:58 +0100

Quoted text here. Click to load it

What's wrong with good old x86? There are plenty of bootloaders for a
start...


Re: Is it a lost cause?
On Mon, 13 Jun 2016 21:02:20 +0200, Melzzzzz wrote:

Quoted text here. Click to load it

Some architectures are easier for a student to understand. The more  
orthogonal it is the better otherwise the student can get frustrated with  
apparently arbitrary limitations on which address modes can be used with  
what opcode.  

I've never written Intel assembler, but have a lot of time working with  
6800 and 6809 assembled as well as with PL/9 (essentially a re-
implementation of PL/M for the 6809). However, I remember hearing people  
cursing over lack of orthogonality when writing code for the early Intel  
chips and the Zilog Z80. This was almost never a problem with Motorola  
68xx and 68xxx chips and we had some lovely development packages, such as  
an MACE, an integrated editor/assembler/debugger that would run in 48 Kb  
of RAM.
  

--  
martin@   | Martin Gregorie
gregorie. | Essex, UK
We've slightly trimmed the long signature. Click to see the full one.
Re: Is it a lost cause?
On 6/13/2016 5:25 PM, Martin Gregorie wrote:
Quoted text here. Click to load it

In college I wrote an assembler for the IBM 360 instruction set.  It was  
a semester project.  We programmed this on a Univac 1100/40 which only  
had some 64 kW of memory, lol.  The professors and grad students used  
the 1108, older, but more memory.

The IBM instruction set had a lot of "features" but was fairly  
orthogonal.  The Univac was a lot more ad hoc.

--  

Rick C

Re: Is it a lost cause?
On Mon, 13 Jun 2016 17:43:01 -0400

Quoted text here. Click to load it

This is where the ARM2 and ARM3 processors really shone (I don't know the later
ones).

Instruction set so short you could easily memorise it. You could do anything on
any register except R14 and PC - and you could do some quite heavy manipulation
on those if you were careful!

--  
W J G

Re: Is it a lost cause?
Quoted text here. Click to load it

Direct access to PC not available on ARM64, so you push a calculated result
and return from sub!



Re: Is it a lost cause?
Quoted text here. Click to load it

As usual, you are incorrect.   See the "ADR" and "ADRP" instructions.

Re: Is it a lost cause?
Quoted text here. Click to load it

More personal abuse.

Quoted text here. Click to load it
addresses do not give you the ability to write to the PC.



Re: Is it a lost cause?
On 6/14/2016 11:55 AM, gareth G4SDW GQRP #3339 wrote:
Quoted text here. Click to load it

Writing to the PC is what happens in a jump instruction on any processor.

--  

Rick C

Re: Is it a lost cause?
Quoted text here. Click to load it

The PC is not accessible as though it was one of the general registers as it
has been in the past in ARM architectures



Re: Is it a lost cause?
On 6/14/2016 1:22 PM, gareth G4SDW GQRP #3339 wrote:
Quoted text here. Click to load it

You can read and write it.  What more do you want?

--  

Rick C

Re: Is it a lost cause?
Quoted text here. Click to load it

Computer serendipity where you do such fun things as setting and
clearing bits in the PC, or shifting it left and right, and so on.




Re: Is it a lost cause?
On 6/14/2016 1:41 PM, gareth G4SDW GQRP #3339 wrote:
Quoted text here. Click to load it

You can do anything with the PC you want.  Your only limitation is  
yourself.

--  

Rick C

Re: Is it a lost cause?
Quoted text here. Click to load it

How's your pendulum clock coming along, for I'm just about to
set out on Alan Timmins' 8 day longcase clock?



Re: Is it a lost cause?
On 13/06/2016 22:25, Martin Gregorie wrote:
Quoted text here. Click to load it
Since ARM is used in many embedded applications an Assembler for the ARM  
instruction set with an emulator that runs on the Raspberry Pi could be  
a useful teaching aid.

Re: Is it a lost cause?
On Mon, 13 Jun 2016 23:07:41 +0100, Andrew Swallow wrote:

Quoted text here. Click to load it

Would you need an emulator? MACE didn't have one. Instead it let you set  
breakpoints by temporarily replacing target opcodes with (IIRC) a  
software interrupt (SWI). Thus is neat because when a breakpoint is hit  
the program's state gets saved by the SWI where it can be inspected/
modified by the debugger and control switches to the debugger. The  
debugger's 'continue' command replaced the original instruction and  
issued an RTI (return from interrupt) which restored the program state  
and jumped to the restored instruction. Would something like this work  
with ARM code?

BTW, the other nice feature of MACE was speed. It maintained the source  
you were developing in RAM for editing, saving and assembling. Assembly  
left the binary in RAM too (unless you asked for it to be written to  
disk), so even on a 2MHz 6809 both editing and assembly were very fast.  
Surprisingly, this put very few limits on program size since the in-
memory source module could pull in other source from disk (this was  
assumed to be debugged so didn't have an in-RAM presence).

I'd think an ARM assembler with this type of integrated editor and  
debugger could be an excellent teaching tool since it would be fast to  
use and would avoid the student having to learn much apart from its own  
edit/assemble/debug commands.


--  
martin@   | Martin Gregorie
gregorie. | Essex, UK
We've slightly trimmed the long signature. Click to see the full one.
Re: Is it a lost cause?
Quoted text here. Click to load it

I know nothing of MACE, but a similar SWI was on the PDP11 which
was especially a debug SWI.

However, a problem with that approach is if the restored instruction
is a branck or a jump if you wish to single step. ISTR
that the PDP11 (35 years ago for me!!!!)
had a bit in the processor status that would force a further debug
SWI after 1 instruction.




Re: Is it a lost cause?
On Tue, 14 Jun 2016 08:56:31 +0100, gareth G4SDW GQRP #3339 wrote:

Quoted text here. Click to load it

The T-bit.



--  
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
We've slightly trimmed the long signature. Click to see the full one.
Re: Is it a lost cause?
I demand that Andrew Swallow may or may not have written...

Quoted text here. Click to load it

RISC OS. BBC BASIC. Only issue here is that that isn't an emulator...

--  
|  _  | Darren Salt, using Debian GNU/Linux (and Android)
| ( ) |
We've slightly trimmed the long signature. Click to see the full one.
Re: Is it a lost cause?
Quoted text here. Click to load it

The PI _IS_ an ARM implementation. It uses an arm6 processor. It can run
RiscOS, Linux, FreeBSD among other OSes.  

On Linux there is ample support for assembly. Since I am not well versed
in ARM assembly, I'll show what gcc outputs for hello.c:

-----------------------
$ cat hello.c
#include <stdio.h>

int main (int argc, char ** argv)
{
  printf ("Hello, world\n");
}
$ cc -S hello.c
$ cat hello.s
    .cpu arm6
    .eabi_attribute 27, 3
    .eabi_attribute 28, 1
    .fpu vfpv3-d16
    .eabi_attribute 20, 1
    .eabi_attribute 21, 1
    .eabi_attribute 23, 3
    .eabi_attribute 24, 1
    .eabi_attribute 25, 1
    .eabi_attribute 26, 2
    .eabi_attribute 30, 6
    .eabi_attribute 34, 0
    .eabi_attribute 18, 4
    .file    "hello.c"
    .section    .rodata
    .align    2
.LC0:
    .ascii    "Hello, world0"
    .text
    .align    2
    .global    main
    .type    main, %function
main:
    @ Function supports interworking.
    @ args = 0, pretend = 0, frame = 8
    @ frame_needed = 1, uses_anonymous_args = 0
    stmfd    sp!, {fp, lr}
    add    fp, sp, #4
    sub    sp, sp, #8
    str    r0, [fp, #-8]
    str    r1, [fp, #-12]
    ldr    r0, .L2
    bl    puts
    mov    r0, r3
    sub    sp, fp, #4
    @ sp needed
    ldmfd    sp!, {fp, lr}
    bx    lr
.L3:
    .align    2
.L2:
    .word    .LC0
    .size    main, .-main
    .ident    "GCC: (GNU) 4.8.2 20131219 (prerelease)"
    .section    .note.GNU-stack,"",%progbits
$

-------------
See?  Arm assembly, an integrated part of Linux. (Yes, this
one was generated by c-code. So I cheated.)


-- mrr

Site Timeline