itsapieceofcake said:
95% of our top programmer"s learnt there skills at a much lower level.
I would argue with that. It seems to me, from the comments made on these boards, that 99% of our programmers learned their skills on BBC Micros and Sinclair ZX81s. Some of them then learned assembler, but it was not the first thing they learned, and I know of no introductory computer course that ever started with assembler and then moved up to BASIC.
from your comments you seem to imply that assembly is really hard to learn when in fact it is not much harder than BASIC if your mind is wired in the right way, by this i do not mean that you are more intelligent its just that you learn in such a way that you find assembly easier to understand than some higher level languages.
I have taught many people to code in assembly language most take one look at it and run a mile with out even trying, but those who stick at it and give it a full try make as fast a progress as with any other language. I have found the best way not to scare them is to use what i call MacroBasic to start with and then insert small pieces of assemble like you would in other high level languages use inline, you soon find them optimising and modifying the macros and adding new ones, but code written like this is still full assembly code even though it may look like a higher level language.
Here is a quick linux/x86 example
Mbasic.asm
include "MacroL.inc"
CLS
LOCATE 5,14
PRINT "raspberry pi is cool"
LOCATE 5,16
PRINT "This may look like basic"
LOCATE 5,18
PRINT "but its fully written in assembly"
END
MacroL.inc
format ELF executable
entry start
;==
; CLS.
;==
macro CLS
{
local .Done
local .a
local .b
mov eax,4
mov ebx,1
mov ecx,.a
mov edx,.b
int 80h
jmp .Done
.a db 1bh, "[2J",1bh, "[01;01H"
.b = $-.a
.Done:
}
;==
; PRINT.
;==
macro PRINT String{
local .Done
local .a
local .b
mov eax,4
mov ebx,1
mov ecx,.a
mov edx,.b
int 80h
jmp .Done
.a db String,0xa
.b = $-.a
.Done:
}
;==
; LOCATE.
;==
macro LOCATE col,row
{
local .Done
local .CursorX
local .CursorY
local .ColumnRow
local .ColumnRowSize
pushad
mov dh, 10
;
mov ax, row
and ax, 0FFh
div dh
add ax, "00"
mov [.CursorX], ax
mov ax, col
and ax, 0FFh
div dh
add ax, "00"
mov [.CursorY], ax
mov eax,4
mov ebx,1
mov ecx,.ColumnRow
mov edx,.ColumnRowSize
int 80h
jmp .Done
.ColumnRow db 1bh, "["
.CursorX dw 0
db ";"
.CursorY dw 0
db "H"
.ColumnRowSize = $-.ColumnRow
.Done:
popad
}
;==
; END.
;==
macro END
{
mov eax,1
xor ebx,ebx
int 80h
}
;==
; START of Program.
;==
segment readable writeable executable
start:
This could easily be rewritten in ARM for the R-PI
[edited to format code segments - hope that helps!