site  contact  subhomenews

PC Architecture & Assembly Language book

May 03, 2023 — BarryK

Wow, this has brought back memories! I received a message on the Puppy Forum from Colin. Here it is:

Hi Barry,

This message has been on my list for a long time, but for some reason I've never got around to sending.

I was a student in your Microprocessors class at Edith Cowan back in 1993, and it genuinely was my favourite during my undergrad degree (which ironically was not a science or IT major) and was absolutely the fuel that elevated my interest in computing beyond hobbyist. While I spent the better part of 20yrs in law enforcement, I eventually left government and transitioned to cyber security, making use of the fundamentals I learned in your class, and even referring to your book again when starting to dabble in malware analysis.
After almost 10 years abroad doing a variety of digital forensic work, when I returned to Australia last year and unpacked some boxes I again discovered your Assembly book among the few that I kept. It sits proudly on my bookcase as a reminder that a strong technical base goes a long way.

Thank you for your course, your enthusiasm as a teacher and for the spark that took to me down a different path and a mentally stimulating career living and working in places I never expected.

I hope that you are well, and from your site it appears you are enjoying pursuing both new and old interests.

Regards,

That book was initially, self-published, then got taken up by a publisher in the UK. They published the Third Edition. I retained the rights in Australia, and went on to release the Fifth Edition in 1996. The book was stocked in Dick Smith electronic stores throughout Australia and New Zealand, and was very popular.

At the Fifth Edition, I decided to pull the plug on it, and wrote to Dick Smith that was discontinuing it. Someone from Dick Smith phoned me and expressed disappointment as it was a good seller.

Those were the days of printed books, and people still wrote letters. I literally received hundreds of written testimonials (and emails) from people who loved the book, like Colin.

Snapshots of the Fifth Edition, front and back:

img1

Back:

img2

The book was prescribed at my university as well as a couple of other institutions. And that's where there is a somewhat bitter memory...

There was this subject, "Microprocessors" that I prescribed my book as the textbook. Fine, I received feedback like Colin's. However, one day a student came to the door of my office and proceeded to tell me how shitty my book was. Which came as a complete surprise, an opinion so totally at variance with all prior feedback.

What I found out was one of the lecturers was intensely jealous and was badmouthing the book to his students and other staff. The Microprocessors unit was a first-year unit and taken by many students, so there were parallel classes, including taught by that particular lecturer.

The thing is, I wasn't one of the boys, never went to the staff room at tea/lunch breaks, so was never part of the gossiping. Actually, there were two of them who were jealous. I was incredibly naive back then, and when discovered these back-stabbers was shocked, and lost interest in working at the university.

One of them used to be Coordinator for Microprocessors, but the Head of Dept. took it away from him, gave the role to me. Another reason for him to have a lingering resentment.

The last couple of years there, just went through the motions, lacklustre performance, and resigned. To be more precise, I was not tenured, on 3-year contracts, and resigned in the second year. Then one of the senior lecturers asked if I would come back for one more year, so I did, signed a one-year contract.

I am mentioning this negative memory, as it has in it an important lesson, that another young and aspiring young person who might read this, should learn.

Don't take the above as complaining. No, it was a lesson in life, and I learned from it. What is the lesson? Well, it depends whether you are in a competitive environment of not. If so, and you don't excel relative to your peers then you are OK, otherwise be wary. Also, don't be an outsider, like I was; be pally with the bosses!

I should mention something else, as contrast. I lectured at a couple of technical colleges for 5-6 years, and my peers were such a laid-back easy-going bunch of guys. Good memories.

After that book, I wrote "Windows Assembly Language & Systems Programming", that was published by an international publisher. Then wrote "Flow Design for Embedded Systems", followed by a 2nd edition.

I see that secondhand editions of my books are still available, though I wouldn't recommend them these days. The two systems programming books are just too old. "Flow Design for Embedded Systems" 2nd edition is still in print I think -- I was receiving royalty checks up until a couple of years ago, then I asked them to just give it to a charity, as the checks were too small to process.

Just now checked, yeah, looks like the flow design book is still being published:

https://www.amazon.com.au/Flow-Design-Embedded-Systems-Object-Oriented/dp/087930555X

img3

That was a new paradigm for graphical code design, with C code generation. Particularly good for creating little operating systems.

However, it never caught on, I think because too esoteric. At the time, early 2000s, I lost interest in it. Typical of me back then; intensely interested in something for awhile, then just dropping it. Went on to create "Embedded Vector Editor" (EVE), then circa 2002, Linux, then Puppy.

I picked the book up a few months ago, wondering if I should revisit the topic, but actually had trouble understanding what I had written! Could get back into it, as know some improvements that could be made, but still too much involved in EasyOS, don't have the time for anything else.    

Tags: tech

Chinese mini electric vehicles amazingly cheap

February 27, 2023 — BarryK

I mentioned in a recent post about "The Electric Viking" videos on YouTube -- an Australian guy who posts about electric vehicles, battery technology, car companies, and anything else related.

He posted about tiny EVs in China selling for under US$6,000, so I hunted around for further information. Lots of promotional material online, but I wanted to see a video that shows them in use; the daily experience. I found this great video; a Canadian guy who visited a factory to see them being made, and he got to drive one:

"Tesla being crushed by China's mini EV"
https://www.youtube.com/watch?v=RiXljigqRg0

...absolutely fascinating. Car bays with charging stations, costing one Canadian dollar to drive 100km. That's AU$1.10 and US$0.75.

Here in Australia, we have fragmented charging stations. Tesla stations that other EVs are not allowed to use. Expensive charging -- there was a recent test here, a diesel-engine car and an EV drove 1,400km, and the diesel-engine car cost less for the trip.

Over one million of these little cars have been sold in China, but they are only now starting to appear overseas. One model has just been introduced in Indonesia; the Wuling Air.

A photo of the Geely Panda Mini EV:

img1

In Australia, electric vehicles are over AU$45,000; why so expensive? I did see a report that Tesla is developing a cheaper car, apparently it will be about US$25,000; but that is still expensive compared with a small ICE car.

Here in Australia, we live in a "Nanny State", with very restrictive safety regulations, that keep getting more restrictive. There is an insurance company here, RACWA, that won't insure any vehicle with a safety rating under 4 stars -- yet they will insure motorcycles -- to me that seems hypocritical -- as are the government safety regulations.

I looked around for a crash test of these mini EVs, The Electric Viking has one:

"The EV that will change the world crash tested -- is it SAFE?"
https://www.youtube.com/watch?v=X1Vh2B0Rix8

...yipes, no airbags!

Twenty years ago, lack of airbags here in Australia would have been OK. But I reckoned the Chinese would be aware of the need for increased safety to reach international markets. Yes, look at the Panda Mini EV:

"Geely Panda Mini EV"
https://carnewschina.com/2023/02/01/the-geely-panda-mini-ev-opened-for-pre-sale-and-will-launch-on-february-6/

...driver's side airbag. The electronics looks impressive. 100km/h top speed, OK for city driving. 120km or 200km range, again OK.

Hmm, it might even scrape in to meet the minimum safety legislation in Australia. Don't know about one airbag though.   

Tags: tech

Lots of promising new battery technology

December 23, 2022 — BarryK

After today posting "Electric vehicle reality check", thought perhaps a good idea to do another post with a more positive slant:

https://bkhome.org/news/202212/electric-vehicle-reality-check.html

Lately, have been reading about promising new battery technologies. Some of them will alleviate the environmental disaster that is lithium mining and processing. Some are safer, faster to charge, more recharge cyslces, deeper discharge, etc.

For stationary storage, there is the Gelion battery, which can never catch fire, can be discharged to 0%, environmentally friendly and low cost:

https://createdigital.org.au/australian-developed-stationary-battery-safer-and-greener/

...they have started small-scale production at a factory in Victoria, Australia.

For an alternative technology for stationary storage, how about this; gravity storage using 35-tonne blocks:

https://www.theguardian.com/australia-news/2022/nov/17/new-battery-technology-could-be-a-game-changer-for-regional-australian-communities

There are always new announcements of fantastic battery technologies for electric vehicles, but what has caught my attention is sodium-ion:

https://www.youtube.com/watch?v=QZdWxWtQBHs

...how much of this is hype?

Actually, what got me interested in sodium-ion batteries was a post by this guy, in his "Just have a think" series:

https://www.youtube.com/watch?v=cHNELRnJ_4Y

...he does sober, unbiased, non-hype assessments.

It was on the news here a few days ago, someone's house burnt down, when they left a lithium-powered skateboard on charge. Spontaneous combustion and explosion of lithium-ion batteries is quite common, so we really do need an alternative.

I guess as 2023 progresses, we shall see how true the uptake of sodium-ion battery becomes. If the YouTube posts are to be believed, the Chinese company CATL is already building huge battery production plants in China and Europe, with cars due to hit the streets in 2023.

Interesting times, hey!   

Tags: tech

16GiB RAM module works in Aspire 3

December 22, 2022 — BarryK

I have posted about the Acer Aspire 3 Ryzen 5 experiments:

As reported, it has 8GiB soldered onto the motherboard and 8GiB in a SODIMM card.

Online searching revealed very little information whether the laptop will support anything larger than 8GiB. The Acer official docs state that 8GiB is the maximum. One user reported a 16GiB SODIMM module worked, but he had problems with 32GiB -- no details provided.

I would like to report that a 16GiB module works, or at least has worked with limited usage. Bought this one, described as "Kingston 16GB DDR4 valueRAM SO-DIMM 2Rx8 CL22 3200MHz":

https://www.ple.com.au/Products/647696/kingston-16gb-ddr4-valueram-so-dimm-2rx8-cl22-3200mhz

And for the record, my laptop is Acer Aspire 3 Ryzen 5 3500U A315-23-R7UL, model N18Q13.

The 'free' utility shows total RAM is 21.46GiB, so I suppose 3.54GiB has been carved off the 8GiB soldered-on RAM for use by the GPU.  

Tags: tech

Radical experiment to cool the laptop

December 20, 2022 — BarryK

I posted about an OpenEmbedded compile with the CPU set to "powersave" mode and all CPUs running at 1400MHz:

https://bkhome.org/news/202212/enhancing-the-acer-aspire-3-ryzen-5-laptop.html

Just let it run, compiling the entire 1,620 packages... it took 4 days and 3 hours!

As mentioned in that post, OE was set to use only 3 threads, also compiling of each package was with "make -j2", that is, only using 2 threads.

Decided to try a radical experiment, bought a tilted fan stand from Kmart, only AU$15 (about US$10):

https://www.kmart.com.au/product/laptop-stand-with-fans-43026623

The stand is plastic, however the fans are covered with a metal mesh, so applied closed-cell packaging foam top and bottom to provide some separation:

img1

Took the back plate off the laptop, so that the fans will be blowing directly onto the components inside the laptop.

Wanted to recompile Chromium, as made some changes to the build recipe. Chromium takes the longest to compile and is a severe resource hog. It eats up the RAM. 16GB is needed, though the Aspire 3, my one anyway, shares that with the GPU, so more likely only about 14GB available.

I read one guy reported running out of storage when he had 32GB RAM, but he had set a high number of threads -- don't recall the number. Anyway, decided to leave "make -j2", given my laptops low RAM.

This time, set the CPU to "userspace" mode and set all CPUs to 1700MHz. Then started the recompile of Chromium. In the tray, CPU temperature was ranging from 70°C to 79°C. Summer here, and ambient temperature was probably varying between 25 and 28 -- not sure, as didn't actually measure it.

Chromium took about 20 hours to compile.

How to improve this? Increase that "make -j<n>", but the laptop will probably need more RAM. According to the offical Acer docs, it is already maxed-out, with 8GB soldered on the motherboard and 8GB on a SODIMM card (Samsung 8GB 1rx8 PC4-3200AA).

After an online search, did find posts some guys were able to increase that. One guy said that a 16GB RAM card worked, but there were problems with a 32GB card. No details were provided.

For example, what would be best, a 16GB 1rx8, 2rx8, or 1rx16? I read that x16 cards are bad news. My local computer parts shop has a 2rx8, so will probably try that. That will bump the laptop to 24GB, take off about 2GB for the GPU.

Right, so likely that will be the next experiment. Put the cover back onto the laptop, but still use the fan-stand. Bump the RAM with a 16GB SODIMM card, and try compile Chromium with more threads.

There is very good reason why I set "make -j2" globally for OE. In the past, a higher figure caused some package builds to fail. However, it can be set on a per-package basis, so I could try, say "-j4" for Chromium only. That may considerably speed up the build, but may also result in the CPU running hotter.

One interesting note: most Aspire 3 laptops only have 4GB RAM soldered onto the motherboard. I looked at aliexpress.com, and all the replacement motherboards for my Aspire 3 Ryzen 5 A315-23 only have 4GB RAM. The Aspire 3 family has incredible variability. Acer have used a common housing, screen, etc., with an incredible variety of models.

It is very interesting to experiment with this Ryzen 5 3500U CPU. It supports 1400, 1700 and 2100MHz frequencies, but also has a turbo, or boost, 3700MHz. I think, before had set the CPU to fixed frequencies, that turbo-mode was kicking in, which pushed the temperature to 90°C and over, and the fan to maximum speed. Note that turbo-mode can be turned off, by doing this:

# echo "0" > /sys/devices/system/cpu/cpufreq/boost

...I noticed that my Intel i3 CPU doesn't have that "boost".   

Tags: tech

Enhancing the Acer Aspire 3 Ryzen 5 laptop

December 13, 2022 — BarryK

Posted about buying this yesterday:

https://bkhome.org/news/202212/acer-aspire-3-ryzen-5-3500u-laptop.html

One reason it was bought is to do OpenEmbedded builds, freeing up my main workhorse Lenovo desktop computer. It is doing that right now, and indications are the build will take about three days.

I never timed the build on the Lenovo, as it stopped many times and had to fix recipes. Now it looks like will run right through. This is the new OE Kirkstone build, and compiling a whopping 1,620 packages, including biggies such as Chromium and LibreOffice.

When the build started yesterday, the CPU temperature crept over 80°C, which was a concern. I read somewhere that at 90°C there will be possible CPU damage. EasyOS has Wcpufreq, launched via the "System" menu, and I played with some frequency scaling. Settled on "powersave" mode, running at a constant 1.4GHz. CPU temperature dropped to around 50°C.

Then I remembered that I had configured OE to use only 3 cores. That was because the Lenovo desktop has an Intel i3 CPU. But this new Ryzen 5 has 4 cores and 8 threads.

Don't want to abort the build now, let it run through on only 3 cores. next time, will bump to more cores and see what happens to the temperature.

Watching some videos about how to cool down a laptop, learnt something very interesting. In one video, the guy exlained that he had used three different fan cooler stands, but abandoned them in favour of just a passive tilted stand. He got significant temperature drop just by having the laptop on an angle.

I propped the rear of the Acer up about 1 inch, and CPU temperature dropped 2-3°C. Very interesting, so have ordered this:

https://www.ebay.com.au/itm/275298813162

img1

Watching a few more videos on the Aspire 3, model A315-23, it was a very pleasant surprise how easy it is to open up and access everything. There is a teardown here:

https://www.youtube.com/watch?v=B3dNA03Uqjo

Also extremely interesting is that a second SATA drive can be added. Yes, it came with a NVME SSD; however, the box contained this bracket:

img2

This video shows how to insert the extra SATA drive:

https://www.youtube.com/watch?v=kueqpeO3dJI

Never had a laptop like this before, where can get at everything so easily.

Weight is about 1.9kg, quite heavy. But, the Aspire 3 is a budget mass-produced family, excellent specs for the price.   

Tags: tech

Acer Aspire 3 Ryzen 5 3500U laptop

December 12, 2022 — BarryK

Purchased this today. Had pretty good reasons, but even so, thought about it carefully. What decided me is the specs for the price. Outlining the specs:

CPU: AMD Ryzen 5 3500U
GPU: Radeon Vega Mobile Gfx
RAM: 16GB
SSD: PCIe NVME 1TB

Got it for AU$797 (about 540 US Dollars) from these guys:

https://www.harveynorman.com.au/acer-aspire-3-15-6-inch-r5-3500u-16gb-1tb-ssd-laptop.html

img1

One reason for buying it is to use for OpenEmbedded builds, so as not to tie up my main workhorse computer. Builds are taking over 24 hours, so I can just leave this running, as long as it takes.

OK, the Ryzen 5 is not the latest AMD CPU, but it is no slouch either. Speed comes in similar to an Intel i5, shown in this link:

https://laptopmedia.com/laptop-specs/acer-aspire-3-558/

Another reason for buying it is to test EasyOS. All of my other computers are Intel-based. Except for one that has an Intel GPU on the motherboard and a Radeon card plugged in.

I was half-hoping that there might be some issues with the hardware, that I could work-on, but EasyOS 4.5.3 runs fine, no issues whatsoever. Video works nice, automatically using the Xorg amdgpu driver.

For OE, a 1TB SSD is required, and being builtin, it should compile faster, compared with the USB SSDs that I have been using so far. Also, 16GB RAM is essential, 8GB just doesn't cut it, not even with a swap partition -- well that would be OK, except now compiling Chromium and that really does need the 16GB RAM.

Using Windows Partition Manager, shrunk the C: drive down to 72GB, leaving 882GB free. Then booted Easy from USB and created a 32MB fat16 esp partition and the rest a ext4 partition. Then installed Easy to the ext4 partition, with Limine boot-loader in the fat16 partition.  

Tags: tech