Book - Raspberry Pi RISC OS System Programming Revealed


37 posts   Page 1 of 2   1, 2
by kevans67 » Fri Dec 06, 2013 5:49 am
Is anyone planning to checkout a copy of Bruce Smith's newly released book "Raspberry Pi RISC OS System Programming Revealed" anytime in the near future? I would be interesting in hearing opinions of anyone who gets a copy. Plus it's been quiet in this forum, and the book deserves a mention.
Posts: 20
Joined: Wed Jan 23, 2013 5:54 am
by Burngate » Fri Dec 06, 2013 10:43 am
Just ordered it.

I'm a great fan of this guy.
User avatar
Posts: 4751
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by kayel » Fri Dec 06, 2013 6:16 pm
I have the book and it's a big disappointment. Nothing to show how to connect an interrupt to a GPIO pin. Nothing on pull-ups/downs. Nothing on I2c. Nothing on UART, etc. What is the device number of the GPIO? I still don't know. The GPIO section of the book shows how to switch on and off an LED and that's it.
Come back DavidS.
Posts: 77
Joined: Sun May 13, 2012 4:45 am
Location: France
by DexOS » Fri Dec 06, 2013 8:27 pm
kayel wrote:I have the book and it's a big disappointment. Nothing to show how to connect an interrupt to a GPIO pin. Nothing on pull-ups/downs. Nothing on I2c. Nothing on UART, etc. What is the device number of the GPIO? I still don't know. The GPIO section of the book shows how to switch on and off an LED and that's it.
Come back DavidS.

Book like this are useless these days. all you need is the web.

Also if you want to code low level stuff like this on RISC OS, just map the address's and code as if you where in bare metal (there's lots of info out there)
Eg fasmarm led example:
Code: Select all
format binary as ''
include 'FasmArmMacros\FasmArm.inc'
include 'R_PI_Address\R_PI_Address.inc'
OS_Memory  = 0x68          ;
OS_ReadC   = 0x04          ; The purpose of this call is to read a character from the input stream.
OS_Write0  = 0x02          ; Define the two system calls
OS_Exit    = 0x11          ; used in this code
OS_ReadEscapeState = 0x2c  ; The purpose of this call is to check whether an escape condition has occurred
                           ;
;========================= ;
; Header start             ;
;========================= ;
org 0x8000                 ; org (may not be needed ?
use32                      ; use 32bit
mov   r0,r0                ; Decompression code call
mov   r0,r0                ; Self-relocation code call
mov   r0,r0                ; Zero initialisation code call
bl    start                ; Program entry call
swi   OS_Exit              ; Fall-out trap to force exit
dw    0x40                 ; Read-only area size (header)
dw    StackBuffer-start    ; 0x200                ; Read-write area size (code)
dw    0                    ; Debug area size
dw    0                    ; Zero initialisation size
dw    0                    ; Debug type
dw    0x8000               ; Current base of absolute
dw    0                    ; Workspace required
dw    32                   ; Flag software as 32 bit PCR okay
dw    0                    ; Data base address when linked
dw    0                    ; Reserved header (should be zero)
dw    0                    ; Reserved header (should be zero
message:                   ;
db "Press anykey to start led flashing,then Escape to exit",0xa ,0,0,0
align 4                    ;
;========================= ;
; start                    ;
;========================= ;
start:                     ;
adr   r0,message           ; Pointer to message
swi   OS_Write0            ; OS call writes until null byte
IMM32 r13,StackBuffer      ; set stack up
;========================= ;
; Map GPIO                 ;
;========================= ;
mov   r0,1                 ;
mov   r0,r0,lsl 17         ; 13
add   r0,0x0d              ; Reason Code "Map in IO temporary"
IMM32 r1,GPIO_BASE         ; Physical address to map in
IMM32 r2,4096              ;
swi   OS_Memory            ; The purpose of this call is to perform various operations for memory management.
                           ;
IMM32 r1,GpioBase          ;
str   r3,[r1]              ; save pointer to the mapped area
;========================= ;
; Map ARM TIMER            ;
;========================= ;
mov   r0,1                 ;
mov   r0,r0,lsl 17         ; 13
add   r0,0x0d              ; Reason Code "Map in IO temporary"
IMM32 r1,ARM_TIMER_BASE    ; Physical address to map in
IMM32 r2,4096              ;
swi   OS_Memory            ; The purpose of this call is to perform various operations for memory management.
                           ;
IMM32 r1,ArmTimerBase      ;
str   r3,[r1]              ; save pointer to the mapped area
bl    SetGPIOfunction      ; Set the GPIO function select
swi   OS_ReadC             ; wait for keypress
align 4                    ;
loopAgain:                 ; main loop
;========================= ;
; Turn led on              ;
;========================= ;
bl    SetLow               ; call turn on led function
;========================= ;
; Delay 1 second           ;
;========================= ;
IMM32 r0,1000000           ; delay one second
bl    DelayFunction        ;
;========================= ;
; Turn led off             ;
;========================= ;
bl    SetHigh              ; call turn off led function
;========================= ;
; Delay 1 second           ;
;========================= ;
IMM32 r0,1000000           ; delay one second
bl    DelayFunction        ;
;========================= ;
; Test for exit            ;
;========================= ;
SWI   OS_ReadEscapeState   ;
bcc   loopAgain            ; exit if Escape pressed
;========================= ;
; Exit                     ;
;========================= ;
mov   r0,0                 ; Define return code
swi   OS_Exit              ; And exit.
                           ;
align 4                    ;
GpioBase        dw  0      ; GpioBase mmap address
ArmTimerBase    dw  0      ; ArmTimerBase mmap address
                           ;
align 4                    ;
; -----------------------  ;
; Set GPIO function select ;
; -----------------------  ;
SetGPIOfunction:           ;  Set the GPIO function select
stmfd sp!,{r0-r8, r12, lr} ; Store registers
                           ;
ldr   r0,[GpioBase]        ; = 0x20200000
ldr   r1,[r0,GPFSEL1]      ; = 0x20200004
bic   r1,r1,0x1c0000       ;
orr   r1,r1,0x40000        ;
ldr   r0,[GpioBase]        ; = 0x20200000
str   r1,[r0,GPFSEL1]      ; = 0x20200004
                           ;
ldmfd sp!,{r0-r8, r12, pc} ; Restore registers and return
align 4                    ;
; -----------------------  ;
; Turn off OK led          ; Set GPIO 16 to high, causing the LED to turn off.
; -----------------------  ;
SetHigh:                   ;
stmfd sp!,{r0-r8, r12, lr} ; Store registers
                           ;
ldr   r0,[GpioBase]        ; = 0x20200000
add   r0,r0, GPSET0        ; = 0x2020001C
IMM32 r1,0x10000           ;
str   r1,[r0]              ;
ldmfd sp!,{r0-r8, r12, pc} ; Restore registers and return
; -----------------------  ;
; Turn on OK led           ; Set GPIO 16 to low, causing the LED to turn on.
; -----------------------  ;
SetLow:                    ;
stmfd sp!,{r0-r8, r12, lr} ; Store registers
                           ;
ldr   r0,[GpioBase]        ; = 0x20200000
add   r0,r0,GPCLR0         ; = 0x20200028
IMM32 r1,0x10000           ;
str   r1,[r0]              ;
                           ;
ldmfd sp!,{r0-r8, r12, pc} ; Restore registers and return
align 4                    ;
; ------------------------ ;
; DelayFunction            ;
; ------------------------ ;
; Delay = r0               ;
; 1000000 = 1 second       ;
; ------------------------ ;
DelayFunction:             ;
stmfd sp!,{r0-r11, r12, lr}; Store registers
ldr   r1,[ArmTimerBase]    ;
IMM32 r2,TimerVar1         ;
str   r2,[r1,ARM_TIMER_CTL];
IMM32 r2,TimerVar2         ;
str   r2,[r1,ARM_TIMER_CTL];
ldr   r1,[ArmTimerBase]    ;
ldr   r2,[r1,ARM_TIMER_CNT];
add   r2,r2,r0             ;
align 4                    ;
DelayFunctionLoop:         ;
ldr   r3,[r1,ARM_TIMER_CNT];
cmp   r3,r2                ;
blt   DelayFunctionLoop    ;
ldmfd sp!,{r0-r11, r12, pc}; Restore registers and return
align 4                    ;
;========================= ;
; Delay = r4         temp  ;
;========================= ;
Delay:                     ;
stmfd sp!, {r0-r8, r12, lr}; Store registers
mov   r2,r4                ; mov delay to r2
Delayloop:                 ;
subs  r2,r2,1              ;
bne   Delayloop            ;
ldmfd sp!, {r0-r8, r12, pc}; Restore registers and return
;========================= ;
; Data                     ;
;========================= ;
rb   0x1000                ;
StackBuffer:  dw   0       ;


Come back DavidS.

I hope DavidS has not left, he's one of the best coders on the forum.
Batteries not included, Some assembly required.
User avatar
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
by kayel » Sat Dec 07, 2013 9:42 pm
Thanks for the reply DexOS.
Last edited by kayel on Sat Dec 07, 2013 11:38 pm, edited 1 time in total.
Posts: 77
Joined: Sun May 13, 2012 4:45 am
Location: France
by kevans67 » Sat Dec 07, 2013 11:04 pm
<moved to separate thread>
Last edited by kevans67 on Sun Dec 08, 2013 2:05 am, edited 1 time in total.
Posts: 20
Joined: Wed Jan 23, 2013 5:54 am
by kayel » Sat Dec 07, 2013 11:39 pm
Hi Kevans67,

You're right. It's gone.
Posts: 77
Joined: Sun May 13, 2012 4:45 am
Location: France
by kevans67 » Mon Dec 09, 2013 5:36 am
kayel - since you have the book I was wondering what Chapters 16 and 17 have in them. Does he work out any interesting examples? I downloaded the code from his site (http://www.brucesmith.info/blog/?post_t ... eview=true) but didn't see any examples of a windowing program. Maybe I just missed it?

There seemed to be some repetition of some of the simpler code too with minor changes. e.g. the gpio code.

Even though this information in online, I was hoping for something like a complete music method, where he takes you from knowing next to nothing about RISC OS to building interesting WIMP applications. It's probably too much to ask for. If I were a serious RISC OS user then I guess I would already know this stuff, or have purchased the book.
Posts: 20
Joined: Wed Jan 23, 2013 5:54 am
by fladda » Mon Dec 09, 2013 8:48 am
I've only just received my copy of the book, so I'm not going to comment upon the whole book in detail until I've at least read everything.

However, in defense of the author, Bruce does state early on (p16) that he can only just touch the surface in this book as there is so much detail that could be covered. Bruce says that the entire book could just cover the RISC OS desktop.

At the end of the book (p303) Bruce says "There is so much more that could be covered and that fact is supported by the 400 pages of the Programmer's Reference Manuals". Not to mention the huge BCM2835 which Bruce recommends that you download (p293).

So there's no way that a 300 page book can cover everything in the detail that some people on these forums would like to see. However, Bruce appears to have done a good job trying to capture the fundamentals of the RISC OS operating system, and how this has been 'tweaked' to run on the Rapberry PI. I believe that in many ways RISC OS is the ideal operating system for the Raspberry PI - especially for teaching and for accessing 'low level' stuff or for real-time applications.

RISC OS users need to be more evangelistic and try and encourage new people to the RISC OS platform. Success breeds success, and the more new users and developers RISC OS gets the better. So well done to Bruce for publishing this book.

Ralph
Posts: 17
Joined: Fri Jan 04, 2013 1:46 pm
by kayel » Mon Dec 09, 2013 8:56 am
kevans67 wrote:kayel - since you have the book I was wondering what Chapters 16 and 17 have in them. Does he work out any interesting examples? I downloaded the code from his site (http://www.brucesmith.info/blog/?post_t ... eview=true) but didn't see any examples of a windowing program. Maybe I just missed it?

There seemed to be some repetition of some of the simpler code too with minor changes. e.g. the gpio code.

Even though this information in online, I was hoping for something like a complete music method, where he takes you from knowing next to nothing about RISC OS to building interesting WIMP applications. It's probably too much to ask for. If I were a serious RISC OS user then I guess I would already know this stuff, or have purchased the book.


Hello again,

Chapters 16 and 17 have no interesting examples. If you want to learn WIMP programming you have the best book I've read in years in SDFS::RISCOSpi.$.Documents.Books. It's called "A Beginner's Guide To Wimp Programming". If you're new to Basic programming there is also a book called "First Steps in Programming Riscos Computers" by the same author, Martyn Fox. I used these books not only to learn WIMP programming but also to learn a bit about riscos because I'd never heard of it until I bought my pi. You can download my first and only Wimp program here:

http://gregblog85000.free.fr/?p=343
Posts: 77
Joined: Sun May 13, 2012 4:45 am
Location: France
by kayel » Mon Dec 09, 2013 9:05 am
@fiadda,

I couldn't agree with you more about riscos being ideal for low-level stuff and teaching. Try unplugging Windoze or linux while it's running and you'll see what I mean. Riscos just starts up as if you left it cleanly. This is a very big plus if you're a grotty programmer like me who often gets stuck in infinite loops. A big time saver.

I couldn't agree with you less about the book.
Posts: 77
Joined: Sun May 13, 2012 4:45 am
Location: France
by GavinW » Mon Dec 09, 2013 2:30 pm
RISC OS users need to be more evangelistic and try and encourage new people to the RISC OS platform. Success breeds success, and the more new users and developers RISC OS gets the better. So well done to Bruce for publishing this book.


I agree. A long time ago I helped to run a network of fifty or so Archimedes for teaching Introduction to Computing. Amongst other software we used Gofer (a Haskell interpreter) for Introduction to Computing - that blew the minds of the students who had only been exposed to Basic or FORTRAN. The eventual move to IBM PCs was a very sad backward step imposed from above. Crashes were rare on the Archimedes network and the class could be functioning again in a matter of minutes. With the IBM PCs a crash meant the end of the class, possibly for the rest of the week, for bureaucratic as well as technical reasons.

It would be good to have more young people and more programmers involved in RISC OS. The Raspberry Pi has brought this hope.
otium negare negotium vanum
User avatar
Posts: 71
Joined: Tue Nov 01, 2011 8:11 pm
Location: UK
by DexOS » Mon Dec 09, 2013 6:36 pm
I did a lot of low level stuff on RISC OS and found the OS ideal for this, but got put off the OS by the lack of encouragement for new programmers.

When the next show was, seamed more important than new coders who new how to code at a low level.
Batteries not included, Some assembly required.
User avatar
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
by jamesh » Mon Dec 09, 2013 6:49 pm
DexOS wrote:
Come back DavidS.

I hope DavidS has not left, he's one of the best coders on the forum.


I'm always wary of assembler evangelists (as I am wary of any evangelists, of any sort, who are unable to see other points of view), and people who claim what DavidS claims. He may be, as you say, a very competent coder, but some of his claims are, shall we say, a little ambitious. For example, anyone can write a compiler, in assembler in a week (I paraphrase). Now perhaps some people, a very very few, can, but not everyone, not be a long chalk. He need to look around him and see what other are capable of before making claims like that!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17116
Joined: Sat Jul 30, 2011 7:41 pm
by AMcS » Tue Dec 10, 2013 1:14 am
DexOS wrote:I did a lot of low level stuff on RISC OS and found the OS ideal for this, but got put off the OS by the lack of encouragement for new programmers.

When the next show was, seamed more important than new coders who new how to code at a low level.


DexOS your contributions here with regards to RISC OS are much appreciated, I am a tad concerned though that you were "put off" by a perceived lack of encouragement for new programmers. What do you think would be a useful form of encouragement ?
Posts: 184
Joined: Sun Jan 06, 2013 11:23 am
Location: Dublin, Ireland
by AMcS » Tue Dec 10, 2013 2:09 am
jamesh wrote:
DexOS wrote:
Come back DavidS.

I hope DavidS has not left, he's one of the best coders on the forum.


I'm always wary of assembler evangelists (as I am wary of any evangelists, of any sort, who are unable to see other points of view), and people who claim what DavidS claims. He may be, as you say, a very competent coder, but some of his claims are, shall we say, a little ambitious. For example, anyone can write a compiler, in assembler in a week (I paraphrase). Now perhaps some people, a very very few, can, but not everyone, not be a long chalk. He need to look around him and see what other are capable of before making claims like that!


I believe DexOS may have made his reference to DavidS as "one of the best coders" based on submissions of code DavidS made demonstrating how to code in assembler for RISC OS (i.e., it was not dependant on claims but on actual code supplied). Such open exchanges of information and code is very helpful to novices learning to code - particularly in ARM assembler - so I would be loath to discourage someone who is willing to contribute code/advice etc., from doing so to this august forum.
Posts: 184
Joined: Sun Jan 06, 2013 11:23 am
Location: Dublin, Ireland
by DexOS » Tue Dec 10, 2013 11:58 pm
AMcS wrote:
DexOS wrote:I did a lot of low level stuff on RISC OS and found the OS ideal for this, but got put off the OS by the lack of encouragement for new programmers.

When the next show was, seamed more important than new coders who new how to code at a low level.


DexOS your contributions here with regards to RISC OS are much appreciated, I am a tad concerned though that you were "put off" by a perceived lack of encouragement for new programmers. What do you think would be a useful form of encouragement ?

Hi AMcS,
Its hard to put your finger on it, but i get the impression that RISC OS people are stuck in there ways and things much be done in a set way, or not at all.
This has been good in the past and has kept RISC OS alive.
But now they have a opportunity to take RISC OS to the next stage, but the thing that has kept RISC OS alive is now holding it back.

There's is a need out there for a fast OS that lets coders and experimenters make projects without getting in the way.
It must be small enough to understand, but still have the needed functionality.
Its must not be a linux clone, by slowly moving over to C, there's nothing wrong with linux, i use it everyday, but RISC OS needs to be different.

I think RISC OS need to stay asm and basic, and new programmer's need to be encouraged more.
I would suggest taking a look at http://kolibrios.org/en/.
People often say its hard to find assembly programmers, but kolibrios seem to find and encourage many coders, RISC OS should be the same.

I for example have spent a long time coding a usb stack in full assembly for my hobby OS for the pi, now why am i doing that when RISC OS is my ideal OS ?.

Its the little things that need to be looked at, for example where on any of the main forum's is there's a programmers sub forum ?.

Please note, this is just a outsider looking in point of view and the people that have worked on RISC OS have done a great job.
Batteries not included, Some assembly required.
User avatar
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
by GavinW » Wed Dec 11, 2013 12:06 pm
I think RISC OS need to stay asm and basic


I could not disagree more. It is true that in the early days of Acorn and RISC OS, BBC Basic and its ARM assembler were wonderful tools. They were certainly responsible for inspiring many people to learn programming - at that level.
But the days when programming was an activity just for the lone individual are long gone (remember FORTH, the write-once, read-never programming system?). Permit me to try to shock you by saying that programming has more to do with communicating with people than with machines; and designing algorithms more to do with type-constructors or classes than with control-loops. Programming has moved on a very long way since Kemeny and Kurtz created Basic. What is more, Acorn and RISC OS were once in the vanguard of developments in programming. Ponder was implemented on an Archimedes - the only programming language to implement the second-order polymorphic lambda calculus.

I do not mean to denigrate ARM assembler, BBC Basic or lone programmers, but they are only part of a bigger picture. The opinion cited shows an ignorance of the history of programming as well as of RISC OS.

RISC OS people are stuck in their ways because they are old. I am old. I would certainly like to see more young people using it. But I would regret it if Basic and assembler were the limit of their ambition. How about Haskell? Caml? Is some bright spark ready to port modern programming languages to RISC OS? Meanwhile, have a go at using RiscLua - it is easier and more consistent in its syntax than Basic.
otium negare negotium vanum
User avatar
Posts: 71
Joined: Tue Nov 01, 2011 8:11 pm
Location: UK
by jamesh » Wed Dec 11, 2013 12:34 pm
AMcS wrote:
jamesh wrote:
I'm always wary of assembler evangelists (as I am wary of any evangelists, of any sort, who are unable to see other points of view), and people who claim what DavidS claims. He may be, as you say, a very competent coder, but some of his claims are, shall we say, a little ambitious. For example, anyone can write a compiler, in assembler in a week (I paraphrase). Now perhaps some people, a very very few, can, but not everyone, not be a long chalk. He need to look around him and see what other are capable of before making claims like that!


I believe DexOS may have made his reference to DavidS as "one of the best coders" based on submissions of code DavidS made demonstrating how to code in assembler for RISC OS (i.e., it was not dependant on claims but on actual code supplied). Such open exchanges of information and code is very helpful to novices learning to code - particularly in ARM assembler - so I would be loath to discourage someone who is willing to contribute code/advice etc., from doing so to this august forum.


I'm not trying to discourage code sharing. Just wild claims that may give people the wrong impression. Like novices (to programming) should be learning ARM assembler, ARM assembler is better than a HLL, ARM assembler is easy, ARM assembler can get you more girlfriends etc.

And of course, DexOS has no idea how competent others on here may be, so its difficult to say whether his statement can be backed up by facts. I know personally quite a few exceptional coders who post on here, but I don't claim they are the some of the best coders here since I have no idea how good anyone else is.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17116
Joined: Sat Jul 30, 2011 7:41 pm
by DexOS » Wed Dec 11, 2013 8:59 pm
jamesh wrote:And of course, DexOS has no idea how competent others on here may be, so its difficult to say whether his statement can be backed up by facts. I know personally quite a few exceptional coders who post on here, but I don't claim they are the some of the best coders here since I have no idea how good anyone else is.
I am sure your right, there's lots of good coders on the raspberry pi forum including you.
But to me coding is 20% coding and 80% problem solving, there's a lot of good coders out there, but only a small number of problem solvers.
For example we can all code a piece software if we have all the data sheets and doc's, but without them most are lost, this is where the problem solvers shine through.
Herman H Hermitage is a good example of a problem solver and so is DavidS.

Also you seem to have a problem with assembly coders why ? .

If assembly coder's came on here saying assembly is very hard and only the smartest people can code in it, then i would understand you having a problem.
But they do not, they come on saying assembly is easy and anyone can pick it up.
So hopefully DavidS will be back soon to share his knowledge and teach the art of problem solving, that is in short supply.
Batteries not included, Some assembly required.
User avatar
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
by jamesh » Wed Dec 11, 2013 9:42 pm
DexOS wrote:
jamesh wrote:And of course, DexOS has no idea how competent others on here may be, so its difficult to say whether his statement can be backed up by facts. I know personally quite a few exceptional coders who post on here, but I don't claim they are the some of the best coders here since I have no idea how good anyone else is.
I am sure your right, there's lots of good coders on the raspberry pi forum including you.
But to me coding is 20% coding and 80% problem solving, there's a lot of good coders out there, but only a small number of problem solvers.
For example we can all code a piece software if we have all the data sheets and doc's, but without them most are lost, this is where the problem solvers shine through.
Herman H Hermitage is a good example of a problem solver and so is DavidS.

Also you seem to have a problem with assembly coders why ? .

If assembly coder's came on here saying assembly is very hard and only the smartest people can code in it, then i would understand you having a problem.
But they do not, they come on saying assembly is easy and anyone can pick it up.
So hopefully DavidS will be back soon to share his knowledge and teach the art of problem solving, that is in short supply.


I absolutely don't have a problem with assembly coders. I've done an awful lot of it in my time (starting on the BBC Micro, up to writing vector assembler on the Videocore). But for many years now, I have been more productive and produced much better code in HLL's. As do the vast vast huge enormous majority of softies. So it's claims from people who write assembly that is easier (it isn't), it's faster to write (it isn't), it's easier to debug (it usually isn't) and it's faster (with optimising compilers, usually not). And that's not my own personal view but the view of the huge majority of much more competent people than I.

As for Herman Hermitage - his work is truly impressive. We originally though it was an ex-Broadcom/Videocore engineer as he was produced such good work, but it turns out he isn't, which makes his work all the more impressive.

My own opinion is that DavidS is better than I am at coding, btw!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17116
Joined: Sat Jul 30, 2011 7:41 pm
by DexOS » Wed Dec 11, 2013 10:20 pm
jamesh wrote: So it's claims from people who write assembly that is easier (it isn't), it's faster to write (it isn't), it's easier to debug (it usually isn't) and it's faster (with optimising compilers, usually not). And that's not my own personal view but the view of the huge majority of much more competent people than I.

My own opinion on the above statements
1. Some people find assembly easier than HLL (a number with Dyslexia for example), so they should give it a try if they are finding HLL hard.

2. I would 100% say its take's longer to write code in assembly.

3. I would say its easier to debug, this is because assembly coders in most case's write everything themselves, so the bugs are of there own making, so are easier to track down.

4. I will 100% agree with you on this one, in 95% of case the "optimising compilers" will output more optimized code than most assembly programmers.
Batteries not included, Some assembly required.
User avatar
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
by kayel » Thu Dec 12, 2013 5:29 am
While we're talking about books....

I would be interested in hearing other people's opinions on Bruce Smith's book. It's not because I didn't get what I wanted that the book is bad ( although my opinion hasn't changed on that ). If nothing else it has woken up a sleepy forum.
Posts: 77
Joined: Sun May 13, 2012 4:45 am
Location: France
by MonitorMan » Thu Dec 12, 2013 9:07 am
A friend of mine pointed me in the direction of this thread. I hope he won’t mind me sharing his thoughts with you from an email he sent me:

“The RISC OS community consists of long term users with very clear expertise. Their talent is without question and very impressive. This book is not for them. That said they should realise RISC OS needs new people in the community and needs new users on RISC OS. RISC OS is the ideal OS for the RPI from all considerations - teaching/learning, embedded use, and programming. It needs more users on board. These users need to be encouraged to understand the system, write apps for things they think it missed and build the community. This will only happen if they see an easy way into programming. Many of the experts on RISC OS are long-term users and developers and I suspect many honed their skills back in the 80s and as such will have depended on books such as this. The books target is never the expert user who knows RISC OS programming but the novice user who wants to learn more and become a RISC OS programmer. This has to be obvious I would have thought.

In the era of the web such a book is not needed? That depends on knowing what to search for and then being able to weed through the vast amount of information (and assume it is actually correct). In some ways I think the web is the enemy of productivity rather than its benefactor. As a few people have kindly jumped in and said this book is intended as an introduction. It covers nothing in detail but covers much in overview and provides readers with the information they can then search for in the PRMs or use the web to find out more about the area. I would hope for the novice programmer it is a very usable manual - they may disagree but why would you not support the effort being made and offer help to improve it?”

Me now:
I am not an expert on RISC OS -I do not profess to be - that’s why on this forum some months back I asked for input and assistance for this book and suggestions on content. Not one reply.
This is my first time back into RISC OS since Acorn User days. Unlike the experts who seem to be willing to kill things off because and show how clever they are they, I was willing to give it a go because I really love and believe in RISC OS and have so enjoyed being a user again. As others here have suggested unless more people get into RISC OS it will stutter. Having a book readily available on RISC OS makes it a viable option for people looking at learning OSs on the RPi. Whatever you think of the book it gives RISC OS credibility - a fact acknowledged by ROOL and their open support for the book.

I don’t know how to connect an interrupt to a GPIO pin nor about pull-ups/downs and UARTS and I would respectfully suggest they would belong in a hardware book anyway. But maybe, just maybe - learning to turn an LED on and understand how would stimulate people to look further? Turn to you experts and these forums for help? Mission accomplished!

The point is this book is for beginners. You may not agree with the content but assess it for its market section and potential to stimulate RPI users to switch to RISC OS because of such support. By drawing new users and having several mediums to educate them we can pave the way for more books about RISC OS.
Raspberry Pi Assembly Language now available in book and eBook formats.
For details, go to www.brucesmith.info - examples and programming hints and tips.
Check out the Raspberry Pi Resources page on the website for more information.
User avatar
Posts: 22
Joined: Tue Jan 03, 2012 1:31 am
by assistanceneeded » Thu Dec 12, 2013 9:13 am
I am a NOOB, looking for a good book to teach me some programming skills for the Pi. I don't even know what languages are available, or where to find information. I want a book that has all the information to get me started in programming on the Pi.

Would you recommend this book for me?
Posts: 86
Joined: Wed Dec 04, 2013 1:06 am
Location: Couch