Go to advanced search

by dpawson
Tue Jun 05, 2012 2:46 pm
Forum: Advanced users
Topic: asm printf?
Replies: 40
Views: 6325

Re: asm printf?

Except computers (at assy level) think in twos rather than tens?
That's what I liked about the link I posted.

(Certainly made me think)

Dave
by dpawson
Tue Jun 05, 2012 1:57 pm
Forum: Advanced users
Topic: asm printf?
Replies: 40
Views: 6325

Re: asm printf?

Hi, Sorry, I missed some of the replies on here - forgot to "watch". I have been trying to work out how to print a number to the screen. So far, no luck. I've been reading some of the material on syscalls, but I can't get it to work :( In the mean-time, I've been playing around with more extremely ...
by dpawson
Mon Jun 04, 2012 12:10 pm
Forum: Advanced users
Topic: asm printf?
Replies: 40
Views: 6325

Re: asm printf?

It seems to me that the code in the image is to be executed on its own without a C wrapper, because it starts with a _start label. IIRC, crt0 starts with _start and then calls _main. So I'd guess the code in the image is a direct example of what you need to do. Yep... or nearly. Quite standalone (H...
by dpawson
Mon Jun 04, 2012 11:32 am
Forum: Advanced users
Topic: asm printf?
Replies: 40
Views: 6325

Re: asm printf?

Duh. RTFM The comments above imply the second svc is to end the program. I.e. can delete all after the call to svc #0 (I have changed all the literals from $x to #x in line with ARM conventions) I guess if I could sort out a register setup this would allow a start without a call from C. later. ld pa...
by dpawson
Mon Jun 04, 2012 11:23 am
Forum: Advanced users
Topic: asm printf?
Replies: 40
Views: 6325

Re: asm printf?

http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=55661 I don't fully understand this, but it looks like the string is loaded into r1, the string's length goes in r2. Then we make r7 hold the value 4. This must the code to print to the screen, I think. (To end a program, you make this regis...
by dpawson
Mon Jun 04, 2012 10:43 am
Forum: General programming discussion
Topic: apt-get?
Replies: 7
Views: 3158

Warning: sudoers/visudo WasRe: apt-get?

Just found out the hard way that the /etc/sudoers file editor (some variant of vi)
doesn't respond as a standard vi editor.

C-K H is the help cmd.

Use it. ESC isn't the swap to cmd mode.


Dave
by dpawson
Mon Jun 04, 2012 10:25 am
Forum: General programming discussion
Topic: apt-get?
Replies: 7
Views: 3158

Re: apt-get?

It's debian-specific. What happens if you `sudo -s` and then try the apt-get? Simon as a 'normal user' (I thought that's what sudo was for... or what do I add to sudoers to add 'me'?) same error su pi and it works.... but by now I've added the directories to the path of pi? /usr/local/sbin /usr/sbi...
by dpawson
Mon Jun 04, 2012 9:48 am
Forum: General programming discussion
Topic: apt-get?
Replies: 7
Views: 3158

apt-get?

logged in as pi
$sudo apt-get install gdb

Lots of setup errors reported?

ldconfig not on path
start-stop-daemon not found
update-rc.d not on path...

What's the 'normal' way of running apt-get please?

[And is this appropriate for rpi forum, or a debian question?]

TIA Dave
by dpawson
Mon Jun 04, 2012 9:42 am
Forum: Advanced users
Topic: asm printf?
Replies: 40
Views: 6325

Re: asm printf?

I'd agree with rurwin - "pure assembly" is really only useful if you're building truly tiny systems - look at http://asm.sourceforge.net/asmutils.html and http://www.fefe.de/dietlibc/ for examples (and possibly more useful links). But with the abundant resources of the RPi, it doesn't really seem n...
by dpawson
Fri Jun 01, 2012 11:19 am
Forum: Advanced users
Topic: asm printf?
Replies: 40
Views: 6325

Re: asm printf?

http://omappedia.org/wiki/Writing_ARM_Assembly

Thanks for that.

Clarifies the interface, c-asm.
Should I take it then that there is no svc call for console I/O?
I want to remain in asm and drop the C shell.

Dave
by dpawson
Fri Jun 01, 2012 10:49 am
Forum: Advanced users
Topic: asm printf?
Replies: 40
Views: 6325

Re: asm printf?

Are they generic, or specific to Debian... or rpi?
http://lxr.free-electrons.com/source/ar ... =3.1;a=arm
2005 seems rather old for rpi?

Thanks for the GPIO references. Looks like that is complete. I'll chase it up
for sw i/f.

Dave
by dpawson
Fri Jun 01, 2012 9:54 am
Forum: Advanced users
Topic: asm printf?
Replies: 40
Views: 6325

asm printf?

I can now call asm from a C shell. Rather than do this, are there any documented... system calls? I.e. can I get I/O via some form of call to write to the console/read from it? Any pointers to hardware access too from asm The IO strip or the leds? Has anyone documented this please? Any pointers plea...
by dpawson
Thu May 31, 2012 5:16 am
Forum: General discussion
Topic: What do the lights mean?
Replies: 5
Views: 30650

Re: What do the lights mean?

Thanks Larry. Makes sense.
The only post I've seen on partitioning was over my head. I have Fedora installed
and the numbers just didn't add up.
by dpawson
Wed May 30, 2012 6:21 am
Forum: General discussion
Topic: What do the lights mean?
Replies: 5
Views: 30650

Re: What do the lights mean?

That's better. Cycling the power works.
Debian now back up.

Tks for the pointer.

Any pointers to Debian on rpi? E.g. partd - refuses to let me log in via startx/X windows i/face?

Thanks. Dave
by dpawson
Wed May 30, 2012 5:49 am
Forum: General discussion
Topic: What do the lights mean?
Replies: 5
Views: 30650

What do the lights mean?

The 5 leds on the board show up when working normally.

24 hours on and my rpi appears dead, except for the red power led.
OK
PWR
FDX
LNK
10M

Loaded debian onto the SD card, booted fine yesterday. Came to it later, no screen activity
only the red led showing.

Dave.
by dpawson
Thu Jan 19, 2012 8:00 am
Forum: General discussion
Topic: Computing for Schools paper
Replies: 0
Views: 530

Re: Computing for Schools paper

http://www.computingatschool.o.....Curric.pdf (PDF)

"Endorsed by Google and Microsoft"

Paints a very rosy picture for rpi!
by dpawson
Sat Jan 14, 2012 1:57 pm
Forum: General discussion
Topic: Windows only on ARM?
Replies: 7
Views: 2487

Re: Windows only on ARM?

<r>Slashdot today  <URL url="http://is.gd/jF1TXq">http://is.gd/jF1TXq</URL><br/> <br/> "Microsoft has updated their WHQL certification requirements for Windows 8, and placed specific restrictions on ARM platforms that will make it impossible to install non-Microsoft operating systems on ARM devices,...
by dpawson
Wed Dec 21, 2011 6:20 pm
Forum: General discussion
Topic: Hardware Watchdog
Replies: 16
Views: 3065

Re: Hardware Watchdog

Quote from Gert van Loo on December 20, 2011, 21:18 Yes hardware is pretty hard to get right, but that is why we have a highly experienced team building the chips. Before we ship, we abuse our chips very, very much. In fact I am directly involved in the quality control of this one and we have not y...
by dpawson
Wed Dec 21, 2011 6:17 pm
Forum: Staffroom, classroom and projects
Topic: OS Design and Implementation
Replies: 11
Views: 2899

Re: OS Design and Implementation

<t>Quote from liz on December 20, 2011, 22:35<br/> I can speak for the foundation here: yes, that'd be fine, and we think it'd be more than fine, it'd be positively desirable. The nice thing is that you wouldn't have to bother with bootloaders; you can just write a file which you wish to have inject...
by dpawson
Mon Dec 19, 2011 1:19 pm
Forum: HATs and other add-ons
Topic: Gertboard
Replies: 258
Views: 106430

Re: Gertboard

<t>Great. Glad to see it has such support Gert?<br/> <br/> For me, seeing lights flashing from 'my' program, it's the realisation that I did that<br/> and such a boost to programming confidence.<br/> <br/> If you need community support for any aspect, please ask, I'm sure you'd get it?<br/> <br/> Se...
by dpawson
Mon Dec 19, 2011 12:39 pm
Forum: HATs and other add-ons
Topic: Gertboard
Replies: 258
Views: 106430

Re: Gertboard

<t>Gert, could you give some sort of guess as to what level of skill is required to build it from a kit of parts please? Any guess, worded any way you want? How about on a scale of schoolchild to pro wireman?<br/> <br/> I'm wondering how we might resource buying at 100+ prices and selling on? Any en...
by dpawson
Sat Dec 17, 2011 3:38 pm
Forum: General discussion
Topic: if its good copy it?
Replies: 112
Views: 21235

Re: if its good copy it?

<r><URL url="http://is.gd/jtq6Tg">http://is.gd/jtq6Tg</URL><br/> \"\"An initiative by a Community Interest Company Rhombus Tech aims to provide Software (Libre) Developers with a PCMCIA-sized modular computer that could end up in mass-volume products. The reference design mass-volume pricing guide f...
by dpawson
Wed Dec 14, 2011 3:28 pm
Forum: Staffroom, classroom and projects
Topic: Bash - Programming
Replies: 30
Views: 8341

Re: Bash - Programming

<r>Quote from andywe on December 13, 2011, 13:41<br/> <br/> Any thoughts as to where Bash might fit into a "teaching curriculum" ... ?<br/> <br/> <br/> Yes. When students have a grasp on what other programming languages can do, are sat back wondering about operating systems, disk maintenance, script...
by dpawson
Wed Dec 14, 2011 3:19 pm
Forum: Off topic discussion
Topic: How to get back into programming ?
Replies: 26
Views: 5785

Re: How to get back into programming ?

<r>Quote from mark4th on December 14, 2011, 04:46<br/> <br/> The first step will be to write an ARM assembler in my x86 Linux forth (<URL url="http://www.isforth.com">www.isforth.com</URL>), use that to write the ARM Forth kernel to run on the PI and have it compile various extensions.<br/> <br/> <b...
by dpawson
Tue Dec 13, 2011 1:05 pm
Forum: Staffroom, classroom and projects
Topic: Teaching Real-time Systems
Replies: 14
Views: 6476

Re: Teaching Real-time Systems

<t>1. Think about your realtime needs? Microsecond response? Human response times? Something in between?<br/> 2. Choose your OS to match your answer to 1.<br/> <br/> 3. After that rpi should be perfect. Fast response, assembler level tools free, good enough IO for teaching purposes.<br/> <br/> Ideal...

Go to advanced search