Go to advanced search

by antiloquax
Fri Feb 21, 2014 3:04 pm
Forum: Other languages
Topic: Scheme implementations
Replies: 4
Views: 1476

Re: Scheme implementations

I have just checked this with the latest Raspbian image. There is an error that I cannot explain at the moment - relating to a shared object file. However, it seems to be running okay. If I get a chance I will try to fix this - in the meantime, you can type: (restart 1) to dismiss the error message ...
by antiloquax
Thu Feb 20, 2014 4:43 pm
Forum: Other languages
Topic: Scheme implementations
Replies: 4
Views: 1476

Re: Scheme implementations

The simple answer (if you are using Arch) is ... unpack the archive: tar -xzf mit-scheme.tar.gz This will give you a folder called "mit-scheme-9.1.1_ARM". Inside this is a folder called "usr". Copy this folder into your ~/usr folder. It will put the executables into /usr/local (so it's easy to remov...
by antiloquax
Thu Jun 27, 2013 9:24 am
Forum: Bare metal
Topic: Easter algorithm (Knuth)
Replies: 2
Views: 894

Re: Easter algorithm (Knuth)

Thanks James. I would love to see Knuth in person. He's one of a kind.
by antiloquax
Tue Jun 25, 2013 2:01 pm
Forum: Bare metal
Topic: Easter algorithm (Knuth)
Replies: 2
Views: 894

Easter algorithm (Knuth)

I'm not sure if this is of interest to anyone, but I have been tweaking a program I wrote after reading about the Easter Algorithm in Knuth's "The Art of Computer Programming". I've just been learning how to use macros and I've also gone through and replaced any multiplication by constants with shif...
by antiloquax
Sun Jun 23, 2013 10:39 am
Forum: Bare metal
Topic: ASM code not working
Replies: 2
Views: 593

Re: ASM code not working

Thanks rpdom.
Of course, you are right.
by antiloquax
Sun Jun 23, 2013 8:23 am
Forum: Bare metal
Topic: ASM code not working
Replies: 2
Views: 593

ASM code not working

I was having a play with using macros and wrote this little demo program. @ macros.s @ experimenting with a couple of macros .section .data nl: .byte 0xA @ ascii codes spc: .byte 0x20 char: @ initially holds 65 / 'A'. .byte 0x41 .macro print_ch a @ NB this macro clobbers registers r0, r1, r2 and r7....
by antiloquax
Thu Jun 13, 2013 10:00 am
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

I've realised one problem - I wasn't updating the address from which I loaded my numbers. Here's what the output looks like: [root@alarmpi asm]# ld -o magic magic.o [root@alarmpi asm]# ./magic 25Ò24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 [root@alarmpi asm]# :) I haven't written ...
by antiloquax
Thu Jun 13, 2013 9:50 am
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

Hi, I hope you are still subscribed to this thread, DexOS! I am reading Knuth's TAOCP and he gives an exercise to make a magic square with n = 23. I thought I'd use an array of 16-bit numbers, but I am having problems. Here's what I have so far (I was using n=5 while I tried to get it working). @ ma...
by antiloquax
Fri May 17, 2013 4:49 pm
Forum: Python
Topic: Help with N Queens
Replies: 3
Views: 462

Re: Help with N Queens

Thanks Dave. Yes, I hadn't thought of that. In fact I don't think I've ever used recursion in an OOP program. I'll have to try it.
mark
by antiloquax
Thu May 16, 2013 1:16 pm
Forum: Python
Topic: Help with N Queens
Replies: 3
Views: 462

Help with N Queens

I am having a play with the N Queens problem. I have some working code, but I am not very happy with it. In the program, I make a new empty and add new (partial)solutions to it before returning the current list of (partial)solutions. I think the way I have done this looks clumsy, but I can't work ou...
by antiloquax
Wed Apr 24, 2013 4:28 pm
Forum: Teaching and learning resources
Topic: Links to my resources (lots of python stuff)
Replies: 0
Views: 615

Links to my resources (lots of python stuff)

This page is a wordpress blog where I am gathering links to a variety of resources I have created.
There's stuff on Scratch, Python (mainly mathematical algorithms) and ARM assembly code.
:mrgreen:
by antiloquax
Tue Apr 09, 2013 4:38 pm
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

Thanks dex. I totally agree, the only way to learn is to copy, adapt and practise! After all, how often am I likely to "invent" an algorithm? I was dead pleased with myself when I tried using ORR to add 48 to my "digits" to get the ascii code. You learn most from just trying stuff. :D Many thanks fo...
by antiloquax
Tue Apr 09, 2013 10:26 am
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

Hi Dex, Thanks for your help again. I've been playing around with my print a number code and I think I have a better understanding of the stack. Blog post here. I have been having a go at capturing input, but failing to get the code to move on once the user hits enter. I'll look back over some of yo...
by antiloquax
Thu Apr 04, 2013 3:09 pm
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

Yes - to echo what DEXos said, I am interested in doing some asm because I want to learn more about what is happening on the low level. The rest of the time I am happy to use HLLs like Python, Scheme and Scala. @ DEXos - can I just ask why we need to use the stack to set up those writes to stdout? D...
by antiloquax
Thu Apr 04, 2013 8:37 am
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

Thanks DEXos, that worked great (after a little tweaking because I am using gas).


I now have a program that can convert a .long to ascii chars!

thanks again.
by antiloquax
Wed Apr 03, 2013 9:07 pm
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

Thanks DEXos, I will have a go with that tomorrow.
:D
by antiloquax
Wed Apr 03, 2013 7:26 pm
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

Hi dex, What I want to do is, write numbers to stdout. I think I can manage to convert the binary to a sequence of ascii character codes. I will prob push them onto a stack so I can pop them off in the right order. The problem is that I can't work out how to print. Can I load a number into r1 and ha...
by antiloquax
Sat Mar 30, 2013 9:26 pm
Forum: Arch
Topic: arch_remix_5
Replies: 2
Views: 479

Re: arch_remix_5

Thanks pepedog.
:D
by antiloquax
Sat Mar 30, 2013 6:52 pm
Forum: Arch
Topic: arch_remix_5
Replies: 2
Views: 479

arch_remix_5

I realise that most Arch users will want to set everything up for themselves from scratch, but just in case anyone is interested ... Some of you may have seen Eben Upton showing a screen shot of an RPi with Python embedded in the desktop. If anyone is interested, you can find out more here and downl...
by antiloquax
Sat Mar 30, 2013 6:42 pm
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

Regarding the RISCos book. I am keen to do "pure" asm in Linux using the GNU assembler, but I am finding that book helpful. For instance, I just used it to help me refactor some code from the book "Programming from the Ground Up" into ARM assembly code. It's the program to find the maximum from a se...
by antiloquax
Sat Mar 30, 2013 4:26 pm
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

@dexOS
Many thanks for your code examples.


I've started a little blog to record how my learning of asm is going.
asm blog
by antiloquax
Sat Mar 30, 2013 7:55 am
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

I am particulaly keen to learn the system calls to get input from the keyboard and write out to the screen, eg to take in some numbers, apply a function and print the result. I know how to do this by calling printf, but that's not pure asm.
by antiloquax
Fri Mar 29, 2013 4:05 pm
Forum: RISCOS
Topic: STICKY: New to RISC OS? Read this!
Replies: 83
Views: 131579

Re: New to RISC OS? Read this!

Although I have booted my RPi with RISC OS before, I haven't done much with it. I've just bought this book Raspberry Pi Assembly Language and I am keen to have a go using the BBC BASIC assembler. So far I have only done a few very simple asm things using the GNU assembler under LInux. It's great to ...
by antiloquax
Fri Mar 29, 2013 7:30 am
Forum: Other languages
Topic: Asm tuts
Replies: 63
Views: 12613

Re: Asm tuts

Hi DexOS,
I'd love some assembly tutorials.
:)
by antiloquax
Wed Mar 27, 2013 7:59 pm
Forum: Arch
Topic: Midori & uzbl both crash Xorg randomly
Replies: 29
Views: 6611

Re: Midori & uzbl both crash Xorg randomly

Yes, I like uzbl and it works fine (until X crashes).

I'm hoping there'll be an update for X soon, in the meantime, I have no idea how to fix it. I suppose some of the xorg.conf things mentioned in the thread pepedog linked to may do the trick, but I haven't got around to trying.

Go to advanced search