NitrOS-9 System Calls

I have been mucking about with NitrOS-9, the current version of OS-9, rebuilt for the 6309 CPU. I became curious about the system calls it used, and specifically how often those system calls get called. I ran a shell script to check that. Here’s the script:

ag "os9 " | sed -n 's/.*\([I|F]\$\w*\).*/\1/p' | sort | uniq -c | sort -nr

This resulted in the following histogram:

Count Syscall
789 I$Write
582 I$WritLn
350 I$Read
337 I$GetStt
316 I$Close
314 I$Open
256 F$Exit
228 I$SetStt
201 I$Seek
169 I$ReadLn
106 F$Sleep
100 F$Link
90 I$Create
66 F$Send
66 F$Move
64 F$ID
62 I$Dup
59 F$Time
56 F$Wait
56 F$PrsNam
56 F$PErr
56 F$Fork
52 F$UnLink
52 F$SRqMem
49 F$SRtMem
49 F$CpyMem
45 I$ChgDir
41 F$IRQ
40 I$Delete
40 F$Icpt
36 F$SUser
32 F$Mem
30 F$RegDmp
28 F$Find64
25 F$Load
21 F$VIRQ
21 F$GPrDsc
20 F$LDABX
20 F$Chain
18 F$CRC
17 F$UnLoad
16 F$SSvc
15 I$SETSTT
14 I$CLOSE
14 F$STABX
14 F$Ret64
13 I$GETSTT
13 I$Detach
13 F$GProcP
13 F$CmpNam
12 I$Attach
12 F$Unlink
12 F$SPrior
12 F$IOQu
11 I$MakDir
11 F$SLEEP
11 F$AProc
11 F$AllBit
10 F$EXIT
10 F$DelRAM
10 F$DelBit
10 F$Debug
9 I$Writln
9 I$WRITE
9 I$DUP
9 F$STime
8 F$MapBlk
8 F$All64
7 I$OPEN
7 F$VModul
7 F$NMLoad
6 I$WRITLN
6 I$CREATE
6 F$NProc
6 F$NMLink
6 F$LDDDXY
5 F$WAIT
5 F$SchBit
5 F$FORK
5 F$DelTsk
5 F$Cpymem
5 F$BtMem
5 F$AllRAM
4 F$ICPT
4 F$GBlkMp
4 F$ClrBlk
4 F$AllTsk
3 I$READLN
3 I$READ
3 I$MAKDIR
3 I$Getstt
3 I$DeletX
3 I$DELETE
3 I$CHGDIR
3 F$SetTsk
3 F$SEND
3 F$IODel
3 F$FModul
3 F$CHAIN
3 F$Boot
3 F$AlHRAM
2 I$SEEK
2 I$GSTT
2 F$UNLINK
2 F$TIME
2 F$SUSER
2 F$STIME
2 F$StABX
2 F$SRTMem
2 F$SPRIOR
2 F$SLink
2 F$SAYHI
2 F$PERR
2 F$MEM
2 F$LOAD
2 F$LINK
2 F$DelImg
1 I$writln
1 I$SLEEP
1 I$read
1 F$UNLOAD
1 F$SSWi
1 F$SRQMEM
1 F$SrqMem
1 F$SETSTT
1 F$SetImg
1 F$ResTsk
1 F$RelTsk
1 F$NMLOAD
1 F$NMLINK
1 F$LDAXY
1 F$LdABX
1 F$IOQU
1 F$GTIME
1 F$GPRDSC
1 F$GModDr
1 F$GCMDir
1 F$FreeHB
1 F$exit
1 F$ELink
1 F$DelPrc
1 F$DatMod
1 F$Crc
1 F$AllPrc
1 F$AllImg
1 F$ALL64

Related Posts:

  • No Related Posts
Posted in Computing History, Retrocomputing, The Hardest Hardware | Tagged , , , | Leave a comment

My first dalliance with variadic templates

I just hacked together some code that I believe folks will find useful. It takes advantage of c++11’s variadic templates.

template
bool inList(T a) { return false; }

template
bool inList(T a, T b, Args... args)
{
if (a==b) return true;
else
return inList(a,args...);
}

You can use it to say something like:

int v = 23;
if (inList(v,12,55,23)) { do_something(); }

I wrote it in response to code I’ve had to write which repeatedly had to compare a variable against several alternatives.

Related Posts:

  • No Related Posts
Posted in Programming | Tagged , | Comments Off on My first dalliance with variadic templates

Rethinking Adric

I have been rethinking Adric lately. I don’t mean a complete 180 on my thinking, but rather a refinement. Perhaps he isn’t the utter tool I originally believed, but rather that he is in it entirely for the Lulz.

I have had friends tell me that Adric isn’t so bad and I should give him a second chance. I have always held him directly responsible for the death of the 4th Doctor. In the finale of Logopolis, it is when the Doctor looks down at his companions below that he makes the decision to let go of the telescope and fall to his death. I have always felt that he couldn’t tolerate one more moment with his current companions. His persona at the time couldn’t stomach cold-bloodedly pushing them out into the vacuum of the continuum, so perhaps he felt that his next regeneration could handle it better. It was practically suicide.

Adric was smart. He earned his gold star in maths. I think he did it all for the lulz.

Related Posts:

  • No Related Posts
Posted in Humour | Tagged , , | Comments Off on Rethinking Adric

TestNG Confusion

I love me some TestNG, yes I do, but recently it went completely haywire on a test…


java.lang.AssertionError:
Expected :null
Actual :null

at org.testng.Assert.fail(Assert.java:89)
at org.testng.Assert.failNotSame(Assert.java:485)
at org.testng.Assert.assertNull(Assert.java:421)
at org.testng.Assert.assertNull(Assert.java:410)
at com.comapny.tests.SimpleTest.testExpectedNull(SimpleTest.java:31)

Expected null, actual null? Well those look the same, how can they not be? Simple. I was doing a conversion with String.valueOf.

defaultValue = String.valueOf(defaultValue);

The valueOf(null) is the literal string “null”, something that looks the same in any printed representation. Checking for an actual null, instead of converting it, solved the problem. Like so:

defaultValue = (null==defaultValue) ? null : String.valueOf(defaultValue);

Related Posts:

Posted in Programming | Tagged , , , | Comments Off on TestNG Confusion

A Handy Tip

If you have a RocketFish 90W Universal AC adapter for your laptop and you have a Gateway NV7309u, then the correct tip appears to be 32. They do not have this combination listed in their documentation, so I had to bust out a meter and check the voltages and polarity. I’m putting this here so others who have a similar set up can benefit.

Related Posts:

  • No Related Posts
Posted in How I Roll | Tagged , , , | Comments Off on A Handy Tip

The Path to Faith

Ahhh… science…

On the perceived conflict between science and religion, how pondering the imponderable can be a path to faith:


There once was a man from Trinity,
Who took the square root of infinity.
The number of digits
gave him the figits
So he dropped maths and took up divinity

Related Posts:

  • No Related Posts
Posted in Final Thought, Humour | Tagged , , , | Comments Off on The Path to Faith

Works On My Machine

In a similar vein to my last post, John Grueber suggests the following label be added to software so that folks know that it did work when you tested it.

Related Posts:

  • No Related Posts
Posted in Humour | Tagged , | Comments Off on Works On My Machine

Top 20 Programmer Replies

I don’t have a source for this, it is in my old “humour” files.

  1. “That’s Weird…”
  2. “It’s never done that before.”
  3. “It worked yesterday.”
  4. “How is that possible?”
  5. “It must have a hardware problem.”
  6. “What did you type in wrong to get it to crash?”
  7. “There is something funky in your data”
  8. “I haven’t touched that module in weeks!”
  9. “You must have wrong version.”
  10. “It’s just some unlucky coincidence.”
  11. “I can’t test everything!”
  12. “THIS can’t be the source of THAT.”
  13. “It works, but it’s not been tested.”
  14. “Somebody must have changed my code.”
  15. “Did you check for a virus on your system?”
  16. “Even though it doesn’t work, how does it feel?
  17. “You can’t use that version on your system.”
  18. “Why do you want to do it that way?”
  19. “Where were you when the program blew up?”
  20. “I thought I fixed that.”

Related Posts:

  • No Related Posts
Posted in Humour | Tagged , | Comments Off on Top 20 Programmer Replies

ALL-ONE!

I’ve noticed that when I’m down, I invariably start using liquid Dr. Bronner’s soaps instead of the bar kind. My favorite Dr. Bronner bar is lavender, but it doesn’t compare to liquid Peppermint.

See, Dr. Bronner was this guy who lost his wife, went blind, and then had this revelation where God told him to create the perfect soap. And he did. At least, I think the soap rocks… not just because it’s great soap, but because of the psychotic rants about how the only cosmetics you need are this soap and enough sleep, and being clean will unite the whole world in a single faith created on the foundations of the Moral ABC.

Now, I don’t buy all of that, but it’s a fun read, and the soap leaves my all of my parts feeling keen and tingly. All of them. That’s the peppermint oil, I suppose. Anyhow, check out the website, they’ve got the labels for all the soap for download. Not only that, but it’s made with hemp oil. I mean, they call the guy “THE POPE OF SOAP”, how can you beat that?

Related Posts:

  • No Related Posts
Posted in Humour, Incoherent Ramblings | Tagged , , , | Comments Off on ALL-ONE!

Final Thought: Candidiasis

mostlytongue-cropped.jpg

The term “candidiasis” refers to an infection with yeast, usually Candida albicans. Do not do a google images search on the word. It will give you unspeakable terrors. Seriously.

In any case, awhile back, I went on a slight bender… if a word rhymed with yeast, it got replaced with the term. This led to such wonderment as:

  • Beauty and The Yeast
  • Maggie and The Ferocious Yeast
  • The Number of The Yeast
  • Sexy Yeast
  • The Yeast Within
  • Walking with Prehistoric Yeasts
  • Futurama: The Yeast with a Billion Backs
  • Shadow of The Yeast
  • Legacy of The Yeast

Beauty and The Yeast works particularly well, as I can just envision Angela Lansbury belting out a ditty about it…

Related Posts:

  • No Related Posts
Posted in Final Thought, Humour | Tagged , , | Comments Off on Final Thought: Candidiasis