Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #6575
| From | Alexander Ausserstorfer <bavariasound@chiemgau-net.de> |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: Learning ARM machine code |
| Date | 2025-12-21 17:13 +0200 |
| Organization | None |
| Message-ID | <5c8ebf16e3bavariasound@chiemgau-net.de> (permalink) |
| References | (9 earlier) <050c4e7c5c.harriet@bazleyfamily.co.uk> <5c87099f9bbavariasound@chiemgau-net.de> <5c87163b82News04@avisoft.f9.co.uk> <5c87850775bavariasound@chiemgau-net.de> <5c878d77feNews04@avisoft.f9.co.uk> |
In article <5c878d77feNews04@avisoft.f9.co.uk>, Martin <News04@avisoft.f9.co.uk> wrote: > In article <5c87850775bavariasound@chiemgau-net.de>, > Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote: >>In article <5c87163b82News04@avisoft.f9.co.uk>, >> Martin <News04@avisoft.f9.co.uk> wrote: >>> In article <5c87099f9bbavariasound@chiemgau-net.de>, >>> Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote: >>>> However, you can do this much easier. Just write the hex >>>> values >>> > 01 00 00 EF 48 61 72 72 69 65 74 00 0E F0 A0 E1 >>> That to my mind is MUCH harder, and would give you maintenance >>> nightmares, as it is impossible to read easily. The computer is >>> MUCH better translating plain text into hex and binary then we >>> are. >>> I strongly suggest that is not the way to program these days. It >>> was bad enough 50 years ago, when that was the only option, but >>> certainly not now. >> I don't understand that. The values are much more clear to me. >> Without I couldn't understand how computers are working. > Good luck in understanding it in a year ... or two ...or many more. > Hex code I would not even try, stopping and improvment or development. > As Steve said, we may have to agree to differ! May it be. For me, machine code is much more easy to understand. Because you don't need a compiler it means that there is nothing between you and the machine. You have to know something like a command of ARM (here 32 bit) is 32 bit wide (or 4 bytes what means 8 places in hex). The command beginns with the most significant byte why all four bytes has to be read reversed in byte oder. This makes thinks a bit more complicate because in memory you start with byte four and go back to byte one for each command. The example was: EF000001 72726148 00746569 E1A0F0E0 In memory this is written in byte order, however: (Order counted here in decimal): 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 01 00 00 EF 48 61 72 72 69 65 74 00 0E F0 A0 E1 EF is the command for jumping to a routine of the OS. You're calling this SWI. Learning SWI or EF doesn't matter. Both sais nothing so you have to learn and to know in any way what it means. 000001 is the number of the routine (or SWI). EF is shorter as SWI and 1 is much shorter as this long string "OS_WriteS". With the number, you will get more easy the idea of the table of routines EF links to. When you read the Programmers Reference Manuals about subroutine 1 (or OS_WriteS) you'll learn that this routine uses the next bytes to print them as ASCII characters on the screen. The bytes have to be ASCII encoded and the routine ends by zero, so the bytes 5 up to 11 have to be interpreted as ASCII code. 5. 48 = "H" 6. 61 = "a" 7. 72 = "r" 8. 72 = "r" 9. 69 = "i" 10. 65 = "e" 11. 74 = "t" Byte 12. has the value 00. It stops the subroutine 1. E1 A0 F0 0E writes the value from register &E (LR or fourteen) back to register &F (PC or fiveteen) what means that it gives the controll back to the OS. Because &F is the Programm Counter. It says to the CPU which command from which position in memory it should take next. We had one and a half year of programming C in the school but this way we learnt nothing. It is too abstract. You won't understand how computers are working and you don't understand what you are doing. Everything is hidden before you. You are stuck to the compilers. This is why I started learning ARM machine code. A. -- http://home.chiemgau-net.de/ausserstorfer/
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-04-12 15:11 +0200
Re: Learning ARM machine code Harriet Bazley <harriet@bazleyfamily.co.uk> - 2025-04-13 18:27 +0100
Re: Learning ARM machine code Jean-Michel <jmc.bruck@orange.fr> - 2025-04-14 11:40 +0200
Re: Learning ARM machine code Theo <theom+news@chiark.greenend.org.uk> - 2025-04-14 17:56 +0100
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-07 17:08 +0200
Re: Learning ARM machine code Sebastian Barthel <naitsabes@freenet.de> - 2025-06-09 13:04 +0000
Re: Learning ARM machine code Theo <theom+news@chiark.greenend.org.uk> - 2025-06-09 17:36 +0100
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-10 18:11 +0200
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-14 17:58 +0200
Re: Learning ARM machine code Martin <News03@avisoft.f9.co.uk> - 2025-06-14 17:54 +0100
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-19 06:31 +0200
Re: Learning ARM machine code Martin <News03@avisoft.f9.co.uk> - 2025-06-19 10:09 +0100
Re: Learning ARM machine code Jean-Michel <jmc.bruck@orange.fr> - 2025-06-19 11:32 +0200
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-11-02 16:42 +0200
Re: Learning ARM machine code Martin <News03@avisoft.f9.co.uk> - 2025-11-02 17:01 +0000
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-11-15 14:55 +0200
Re: Learning ARM machine code druck <news@druck.org.uk> - 2025-11-17 19:08 +0000
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-11-15 15:11 +0200
Re: Learning ARM machine code Harriet Bazley <harriet@bazleyfamily.co.uk> - 2025-11-15 19:46 +0000
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-12-06 17:57 +0200
Re: Learning ARM machine code Martin <News04@avisoft.f9.co.uk> - 2025-12-06 18:15 +0000
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-12-07 16:25 +0200
Re: Learning ARM machine code Martin <News04@avisoft.f9.co.uk> - 2025-12-07 15:57 +0000
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-12-21 17:13 +0200
Re: Learning ARM machine code druck <news@druck.org.uk> - 2025-12-22 20:02 +0000
Re: Learning ARM machine code Paul Sprangers <Paul@sprie.nl> - 2025-12-22 23:32 +0100
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2026-01-06 14:42 +0200
Re: Learning ARM machine code anonymouse <na@ignoreme.com> - 2026-01-06 15:02 +0000
Re: Learning ARM machine code Jean-Michel <jmc.bruck@orange.fr> - 2025-12-08 10:23 +0100
Re: Learning ARM machine code Harriet Bazley <harriet@bazleyfamily.co.uk> - 2025-12-06 20:06 +0000
Re: Learning ARM machine code druck <news@druck.org.uk> - 2025-12-09 08:21 +0000
Re: Learning ARM machine code Martin <News04@avisoft.f9.co.uk> - 2025-12-09 09:48 +0000
Re: Learning ARM machine code Richard Ashbery <basura@invalid.addr.uk> - 2025-12-09 10:54 +0000
Re: Learning ARM machine code Steve Fryatt <news@stevefryatt.org.uk> - 2025-11-15 23:46 +0000
Re: Learning ARM machine code Theo <theom+news@chiark.greenend.org.uk> - 2025-11-16 11:59 +0000
Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-12-06 18:10 +0200
Re: Learning ARM machine code Steve Fryatt <news@stevefryatt.org.uk> - 2025-12-07 12:18 +0000
Re: Learning ARM machine code Sebastian Barthel <naitsabes@freenet.de> - 2025-06-10 18:37 +0000
csiph-web