The story so far. I am porting Fusix to the ESP8266 Currently I have it in a state where it boots quite happily and runs all the way up to the login prompt The file system is on a SD card There is a reasonable amount of flash, but it's too slow to run off due to the rather Swap heavy nature of the system boot time is respectable. Let me just hit the reset button and demonstrate There you go At some point I should get a full stick working So nearly everything works including a timer, although it's not very accurate due to Quite a lot of stuff happening with interrupts turned off It's running in single-tasking mode due to the limitations of the system, but actually I can probably run it in Multi-tasking mode the swaps fast enough. So Today we're going to work on the last major piece of the puzzle, which is You can't actually interact with it, which makes it a little tricky to use First, however, let's just do a little bit of Maintenance on the flash Now that we're no longer Copying the file system on to flash We can make the image bigger so current this thing has four megabytes of flash Which is five hundred and twelve Let me start that sentence again, it's got four megabytes of flash the flash it's the file system partition starts at one megabyte and Extends for five twelve arrays blocks, which is Two megabytes so we can actually extend that If we have this that means the file system now starts at 512 K's into the flash giving us five twelve K for the code We're actually using about forty eight K of that, but this gives us lots of buffer if we need more and So that's three and a half megabytes, which is the three five eight four K, which is 896 arrays blocks so you can actually do this and Make the flash file system bigger. It's slow, but it's there so we might as well support it and There we go two and a half megabytes of Usable flash It's just created a new file system This does this if there's no file system found But when I say file system, I mean at the FTL logical block device has been created There are no partitions and no physics file system Let's commit that Okay, so we want to make the TTY work well Right now I'm using the ROM routines to read and write bytes Well, I'm using ROM routines to write bytes. We're not reading yet The way the TTY works in physics is it strictly interrupt driven? You notice that there is no TTY get see way it works is Once the TTY is set up and running an interrupt arrives to say there's some data TTY interrupt here then pulls the byte out of the read buffer and Pushes it towards the TTY device Oh This TTY device and sticks in his buffer and then delivers it to the process When needed So the actual primitives are This one detect this one polls to see whether it's ready to a write Set up Something to do with modem Don't know about this one And I don't know about this one So let's take a look at the MSP430 version Which I'm basing this on So here you can see that the put C is very straightforward We we spin waiting for the buffer to be empty and then we write the byte Sleeping is null TTY white write ready just polls the transmit buffer status and Returns one of these enumerations Setup is no up carrier is no up data consumers are no up. Yeah, very straight forward And the only issue we've got is actually implementing it anyway So I've got the Rom this is simply here. So if I go to ETS put C See what it does this just calls You are TX one char Which actually does the work and There's a comment So this is actually pretty lightweight. It's not calling any additional functions and Here is Rx one char. Oh, there's an interrupt handler Very interesting. I hope it's not buffered. So we've got TX one char Rx one char blocking Rx one char presumably polling So what is this? doing These are some constants This loads a byte multiplies a to buy a for a to is this you also Don't see much in the way of hardware registers Okay, let's find where I put this documentation is a UART mentioned or is this in the Technical docs. I think this is in the other document So if the ROM routines are buffering then we may need to Do some additional work? Okay, I'm apparently I can't find the That reference be nice if this had hyperlinks as well as being you know More complete better written Etc. There we go. You are so we have one read write UART and we've got one write only UART Time for debugging. We are using the The read write UART the ROMs already set it up, which is nice. So we don't have to worry about board rates or anything Okay, this is useful. This tells us how to access the The two hardware five foes This will tell us whether we're ready to read or ready to write the I was actually expecting a one byte buffer, which is what the code here is expecting so Tty ready can be ready now ready soon or or ready later so Given that we have a buffer If the buffer is not full We are ready soon if it is so if it's not full We are ready now if it is full We are either ready soon or ready later probably ready soon for our system. So The FIFO length is not necessarily the one we want Figure interrupt on the screenshot of the interrupt handler, which is actually quite useful. Well, and that's about all there is to it Okay Does it say which How the interrupt is delivered Wow 128 byte buffer, that's quite big So what we are looking for is we want the interrupt to happen whenever The received buffer is not empty. That is there is buffer waiting. So we've got Receive buffer full don't care about Receive buffer overflow These are very similar Receive buffer full will happen When you've got flow control turned on and the UART will take care of turning of telling the sender to stop sending Receive overflows if there isn't any flow control and we don't have flow control when configure threshold value of tout Enable interrupts and UART begin to receive data. It will triggered tout interrupt Once stop transmission time exceeds the set threshold. I think what this is doing is Yeah, you get an interrupt a short time after data shows up So this is the one we want so we need to set up an interrupt handler and Use this particular interrupt Now the fact that the ROMs got this It's own interrupt handler Suggests that the ROMs already set up its buffer so that Incoming data will get sent somewhere I think See we can very easily just override this and set our own interrupt handler So that the interrupts will now be coming to us rather than the ROM I'm just wondering if this is going to upset the Transmit code and this is the init code that sets up the clock speed Which we have overridden all these mem w's and memory synchronization Instructions and they'll indicate that something is fiddling with the registers. I Believe a five is the register base Maybe Right, well, I think that what we're going to have to do is to change Kput char so that instead of Calling ETS put see We talk directly to the hardware So that should be Documented or of course, I could just go look at the Arduino code. It's probably much easier Copy what they're doing. I don't see any reference to the actual data register. I hate that documentation Okay, so Somewhere in here, there should be a reference to you art Like here perhaps this is more complicated than it ought to be because There's some stuff in place for Or Gdb You can use gdb to debug on you Arduino programs which is Rather nice really so it's I actually don't see Here we go. Here is You are doing things. This is interrupt enable. Yeah, this is configuring the ISR So we actually going to want to use some much the same sort of code But I don't want to go there yet. I just want to This is what we want this code. In fact these three functions okay, so So what we're gonna do is You you are TX5 for Full so it's full if there's more than seven F bytes available. That doesn't seem right to me now of course we get the choice of whether we're using the Arduino registers or the SDK registers, I'd rather use the Arduino registers because they seem to be simpler So this is going to be USS is one C U1s so so this should be the number. This is the TX5o count new art status Okay, let the actual register documentation in the SDK stuff is less bad than the rest of it So let me try and find that that should be at the bottom somewhere UART and we're using one C so this is UART status the level of the UART TXD pin eight bits Is that the? No, that's the default value Okay, so the one we're actually looking for is this amount of data in the UART TX5o So what this is doing is saying we're going to consider the UART full if there is If it is more than half full, which is reasonable so For TX5o available. We're just going to go U1 F See I might should add the reason why I'd rather use the Arduino definitions than the SDK definitions is Because eventually I would like to make this code completely independent of the SDK Which right now you have to refer to in the make file to get headers and that's a pain in order to build with so I would much rather replace that dependency with The Arduino stuff that we can just cut and paste into our code. Okay, so this should now be using our own code to write with so let's Build and it doesn't work because we haven't concluded the registers Okay, so that doesn't work Because I am using UART 1 rather than UART 0. There you go So no longer using the ROM routines. Let me just Yep, we've declaring them But we're not using them Okay, so write ready is very much the same code So we're going to say I will actually put this into its own function So this is just going to be TX buffer fill It's greater than equal to 7f then We're actually ready now, but If it's less than that then because say we're ready now Okay, so That's told us how to Write I think the next thing we want to do is I mean, this is all setup codes that we don't care about is We want to register our our ISR We are not using TTY in it for this Is TTY in it actually called anywhere? Yes, it is We could use TTY in it for this you see normally we would attach our interrupt handler down here Yeah, let's just use Okay TTY Let's put this at the bottom So whenever whenever we get an interrupt we print a queue and we probably Okay, just making sure I understood how it worked. We probably want to I Think for an interrupt you get you get This prototype now. It's not ETS compare zero I num. This is a SDK function. So Eagle sock Okay, where is that coming from? It's not say Is this an Arduino? Oh, it's not to find anywhere. We had to do that ourselves and very luckily There is one so that is you are I num Okay, we haven't set anything up yet. So we have to do that This will be in the ESP stuff U0 U0 ie. Yeah, so We actually want to configure some of these so let's take another look at the you are stuff and look for US ie. So this is where It's configuring Yep, that's This is just what we're looking for. So let's just cut and paste all this code Down to here Intrigue Intrigue that 16 When the RX 5.0 full interrupt triggers the value of one triggers a lot Value of 127 will not give much time for the ISR to clear the five for the next byte is dropped Okay, so this is the This is the the RX fill level that we want to actually Make a We want an interrupt to happen at so you see Tot Also, I've just realized remembered rather the buffer is Seven bits wide. So this actually means full So Yep, that's correct. That's not half full. That is full full UC tot is hmm Do we need level and this this will generate an interrupt if I understood it correctly this will generate an interrupt whenever the Whenever data shows up So I don't actually I think we can do without the RX 5.0 level interrupt Because we're not as sophisticated as the Arduino code is so Okay You know interrupt here We want to do this with interrupts turned off.  No, we want Rx 5.0 time out. So I think that's everything So I believe That may you'll be all the code we need so it boots my press a key I Fantastic, it's working We get lots of cues because we haven't actually read anything or cleared the interrupt So what we want to do here is we want to keep Reading bite and delivering it until We have run out of Until the the FIFO buffer is full Let me just go look up where TTY in proc lives It is of course in TTY See, I don't know what happens if the If physics says TTY fills up. I don't actually see any code in here Do we really want to call this from inside an interrupt handler? Right if the key was full it drops the the byte and beeps at the user Okay, so I think this is the right one. So what we want to do is keep looking Yeah, this is the code you want so we want a similar function Rx buffer full. I'm gonna bet that this is Rxc so while Rx buffer fill Is not zero that is while there is some data read a byte Send it to the TTY And we will also need to clear the interrupt. I Hope I've got that right Well, it builds Okay, here we go fantastic It works look LS works We have a completely running system Control C works. It's a little drastic, but it works Okay, I don't know how the this F disk works Okay, so it's listed all our partitions here is our SD card here is The flash Where does geometry come from? I want to partition the flash you see. Oh, right. We haven't implemented this Get Geo. I Don't think this is implemented It should be implemented here, but it's not Anyway, okay, what else have we got? You've got time which I think is not going to Produce anything useful. Yes, zero time taken for that command. Oh PS.  I was the thought Who am I root of course? Oh, yes So this is our boot script. Remember every time we run it We get an error saying that it can't create the utemp file. So we should just be able to Make dear run Why can't we make run? I'm sure I have right permission Yeah That's not good. What was it doing that address? Oh interest. No, I'm going to the wrong address Yes, this is the this is inside the ROM 101 DB No, it's inside the user program Mount crashed for some reason Okay. Well, let's hit the reset button Cannot create There's no M tab. I don't think the file system is rewrite So that's because I actually commented out to the this line Okay, so now it should be rewrite So we should be able to put root prints the the current root file system in a m tab Compatible Format Okay, that's working and give our run Okay, do we have the editor? Yes tab doesn't work Elvis File, I'm not sure we do you've got said Yeah, I don't see anything Okay. Well Yes, now one issue is that the delete key doesn't do anything I have to type control H instead That's actually configurable somewhere And we just need to Edit the TTY somehow edit the TTY configuration Somewhere we can reduce this which will Limit the size because we only have one working TTY the other one is right only Okay, there is our C I'll edit this on the PC. I'm going to have to build some more stuff anyway Does DF work now? What do you mean you can't open m tab it's right there No, it's not m to bar bar No move Right the reason why The reason why that file name was wrong was me mistyping and then trying to use delete Okay, let's remove this Cannot remove Interesting well Right DF now works We've used 62% of our file system do we have mukfs we do Okay So let's try Mukfs dev hdh just use the whole thing 83 2048 and see what happens Confirm yes So now there's be a long pause while it does stuff to the man flash Probably a very long pause. I wasn't aware it was going to do this. I thought it was just going to write the file system structure Anyway, well, that's going Let's check this in and let's go and look for some more applications now We do want oh there we go it's finished, okay, so we should now have We should now have a file system on hdh so dev hdh Again mount dev hdh month There you go There is our flash file system mounted so touch F Through Do we have copy? We've got copy So I can copy in F disk to here Works fine unmount it Interesting has that actually unmounted it. I think it hasn't so I don't know what error that's producing We're missing some stuff. We don't have them We don't have move which is odd so Very odd It might be another command probably cp hardlinked to move the reason for this is If you move files if you move a directory from One file system to another it has to do a recursive copy and then delete So MV is going to have to contain nearly all the code of cp anyway So you see there it's fetching the program name. What does it do with prog name? Yeah, is it is it the cp personality or the move personality? so To do that if you want to copy you want to link cp to move But we can't because there's no ln Okay, let's go find ln Um This is also ln Okay, so we've got copy. So you want to copy copy to ln right Then we link copy to move Now we remove You still need ln to we link copy to ln one Then we move ln one to ln Right, we now have Ln cp and nv Are all linked to the same file on disk. This is the inode count So this is similar to symbolic linking except it works the file system structure level Unix file systems are garbage collected. You can have as many directory entries as you like pointing at underlying files And normally you have one directory entry and one file Which is indicated here there like who am I is the only thing pointing at the who am I binary? But Now we have three different directory entries pointing at mv the underlying data will only get freed up when the last Directory entry disappears and the reference count goes to zero Okay, um No, I can't remember what I was doing now. I Would still like to be able to unmount that file system. Let's Yes, sync works the list looks like it's working So anyway, we want to ln cp to mv cp to ln This these aren't commands that are run. They are Directives to the ucp program. So that will work Here we've got the v7 stuff So we've got programs like tty retails use your current tty Rev reverses a file like so I'm not sure pipes will work. So let's just try this Right, they don't have to come you control see that Apparently we can't That's because we're running in single-tasking mode What other useful stuff is there? It's actually quite a lot of programs. Oh, of course, we've done util Ues micro emacs things like the 6a to 9 assembler or the small c compiler, which doesn't know how to talk to Which only knows how to generate code for a few architectures of which this isn't one won't help Levee is a Vi like editor Cursors games are games What's in DW Drive wire that only makes sense if you're on a device that's got drive wire cp ends not much use because This Isn't a z80. What's this? Oh This looks like more old unix utilities Okay, let's hit the reset button to reboot that Yeah, mounting dirty file system. I think we've actually got the bulk of the useful stuff We could build the games, but the games will probably want cursors Well, there's of course they want curses. These are the curses games So you can build command line games, let's do those so applications games make file Okay, now, how did we do this so we don't need any of that? I think the rest will just work So we need turn cap is that library so Think that will work good not good this is a Host compiler interesting and so that should be this is presumably Building a utility that's being used to build other things. There we go So we've got lots of these missed things. It's an adventure game of some description. Okay, this is This is a manifest listing the um Contents of this directory So we should be able to use this to update our Script to generate file system This will have been processed. This might be my late unlamented build system We can do this easily enough We want to be in So this now wants to be that was all wrong. These all want to be be gets Let's get them all actually Okay Duplicate these Trek stuff wants to be separate applications games like so These want to be the CH mods, which are all those 755 But from a few others Fortune dot that is a data file. So that's going to be 644 Okay, so This isn't a very nice way of building a file system there isn't a standard applications games Star Trek Yep, okay, so Unplug the card Plug it into my PC Is it SDG it is so we should just be able to now do update flash Okay, it ran out of space because the file systems Too big. I wonder if we can make the file system bigger It's 32 meg Okay, so let's me just try something a bit Shifty create a new primary partition to make it the whole whole thing Like so 1.8 gigabytes and Write it. I don't know what the physics maximum limit for a file system is why I need to increase That okay, that's better And why doesn't it why isn't there a tailor made? That's because it didn't build. That's why Okay, it didn't run out of disk space it ran out of file inodes But I am honestly a bit fuzzy about what that number actually means 17 is exist. We already have a user lib. Okay Right unplug out the serial terminal again Plug and hit the reset button and I forgot to update the I forgot to update the RC file. Well, anyway, we're now read write And I'll copy this so that we Get a m-tab Games So here are our games. We should be able to run. Let's try a fortune Thus speak the master programmer without the wind the grass does not move without software hardless Hardware is useless. Well That's Very true. Let's try one of the Missed things assuming I mentioned type the file name correctly Okay, those are error messages Amurabai Try your hand at governing ancient Sumeria.  No, I managed to background my serial terminal No, I did kill it So who's using TTY USB 0 I created a sub shell Okay, I don't know why controls he's not working But we're gonna have to hit the reset button again. It is not resetting How the cycle? Okay, that's the serial terminal has The serial terminal has not crashed. What happened was I hit controls s which meant that it stopped working Okay, it's now we have the physics prompt again Right I Think probably the next thing to do we have some games that more or less work is to fix the boot script Actually, I mean you want to get full sick physics from somewhere. It's in util Why we should be building util? Okay, it's obviously not in our script Yeah, well the good news is that we seem to be coping with a Four gigabyte four megabyte file system Oh that second parameter of the file system size.  I thought it had to do with the I Thought it was way more complicated than that. I thought it's something to do with one of the i-node structures Okay, I don't see any specific you mount Does the Yeah, I think the BCPL compiler Will only Amit Z80 code. Oh, no, it isn't it is interrupt driven. Oh we can Wait, what do you mean? There's no f4th? No, and I didn't I didn't include that either Interesting and some of these files are in here twice. So let me just sort these Yeah, okay, that's better. I think that Oh Can we do TCL we can probably do TCL? It's a very small TCL But we could do TCL, but I can't actually remember any TCL Pilot is another programming language It's good old colossal cave That's worth doing as basic It's a It's a very small basic, but it is at least a basic Though I noticed there is no make file in there Which makes me think that maybe it doesn't work. I am slightly resisting porting stuff like Leve in UE in the cursors games because that would mean needing to set up cursors And I'd have to figure out what terminal type the serial terminal was But I think we actually need to so anyway, let's Let's edit that RC File let's Port colossal cave So we don't want any of that. We want to do root equals That include implications rules.esb8266 and it builds and There is a handy package file be get applications cave Advent Lib, okay, so that is colossal cave. What else? Let's try Let's try Leve that Just to see what how it works 266 Three sets of objects coexist Don't really like the look of that. I do not want to build the Linux version Let's just build the VC 52 version to be honest because we don't care about Cross compilation Multiple compilation in this specific make file So let's see what this does It's okay This is a different type of make file than for the other Programs. Yes, we just want Simplified I don't think we want one of these at all, right? I know No, I think don't think we do. I think that's provided by the oh, yes, we do want that Why doesn't it like health to physics? Because I never actually added the prefix so what that was actually doing was Doing a native doing a host build, so let's try this Fantastic, and is there a package file? There is You can get a man page Okay so be get applications Levee Levee 755 levee I do wonder if you've got a user Can I just do user? man User man man one second work One All right, stick the card back into the PC. Oh Yes, and I did want to look for Okay, we did put lib error into User live let's just make sure it's readable. I don't think that makes a difference and Done so reinserted the card into the board. We hit the reset button. No, we don't we don't I Need to tell the I need to tell screen that we're a vt-52 I think it's that Now we hit the reset button. That's weird The date and time is more or less correct. Okay, so Right the file system is read write, which is a good thing Fussock Did fussock work? Okay fussock. Let me say slash Fussock physics Fussock physics HD a2 Okay, well that's not working for some reason. Well, it's we don't appear not to have any kind of reboots, but We can at least just hit the reset button because we are unmounted Okay, let's edit RC shall we? Mmm, that doesn't work. I can see that it's trying to display stuff, but it hasn't worked control colon Q does at least exit So I think this is So I think that this has at least worked it is trying to display vt-52 But screen is not set up for it. So let's just have a quick title screen Actually, it may not do Vt-52 Okay, let's change this. Let's go to do the easier thing just changes to be antsy That should work. So yes, we do still have to swap cards So it is basically now finished well code complete. I mean there are bugs to fix We did see one crash that crashed horribly it would be nice to be able to catch those and deliver them as signals but We do now have a Functioning sorry, I'm rapidly adjusting stuff behind the scenes. We do now have a functioning Unix on a ESP 8266 with Not a lot of RAM Yes, there is one useful thing that we can do just CRC Gah, I forgot to rebuild Leve after I Swap the card out Well, so now we swap everything back in again, which is why I want to get the thing running in multitasking mode and see if I can make pipes work because that works on the msp430 So it should work on this as well. Okay That's built If you want to know what I think this is useful for the answer is very little I mean, it's a toy. It doesn't have any real-time abilities. It does big chunks of work with interrupts turned off Such as swapping stuff out so if you wanted to Do anything like run a network stack you would have to You'd probably end up needing to use the interrupt priority system So you eventually you basically run the network stack as a kernel task not as a process And then the kernel sits on top of that So that even when the kernels got interrupts turned off then the network stack still runs etc. Etc There you go, so I don't want to run set date anymore These work so yes, that was that was a vi clone just working fine Big as it 27k we don't have a size That's that's mostly most of that will be code Actually, I can figure that out Yeah 25k of code Two and a half k of data But because on this system, we've got 96k of memory 95 and a half the code Doesn't occupy data space So you still get 60 odd k available for your document. Oh Yes, and I also wanted to I'm pretty sure I remembered to add cave to the games list. Oh It's called advent User games is not on the path. No, I don't want to restore a saved game and it doesn't work Yeah, there's something going on here where it's failing to find error messages probably that is This So libero.tex should contain we've got less got more we've got more This contains all the error messages, so they don't have to be loaded into memory given how infrequently they're used but It looks like the binaries are not finding them Maybe I put them in the wrong place C Libs go Error.c no not that one Error.c So path Lib error is where it's supposed to be User Lib Lib Error.txt. Well, here we are in user Lib well Okay, so let's Take a look at that kernel config and Let's try turning this off and see what happens Now assuming it doesn't crash it crashes. Where is it crashing now? This is in Kernel code 2882 Yeah, I should add to that all those programs were working fine in single tasking mode Where you can't actually swap between you can't task between programs at all other than fork and exit So it's interesting just how well it all worked Okay, two one two eight eight two Okay right this is the Same corruption issue. I was seeing before the thing that I spent so much time Fighting that's Extremely interesting So that bug has not actually gone away. It's just hidden It just doesn't manifest in single tasking mode. I wonder if we are running out of Processors what we now have much bigger swap partitioned. So that apparently doesn't help We just figure out what that is so it's this is Kilobytes When I actually I want blocks Okay, well, it's 97 K So we have I've got a two megabyte swap partition. I believe So this was where we had it working for the first time Here we go Sector count. Yes, two megabyte swap partition. That will gives us 20 21 possible swaps, which is lots Somewhere there should be the total number of processors Think is 16 actually This is the total number of file system buffers so Once everything is finished we can do some rearranging and try to save some memory and Then we look to see how much is left and then increase that number until There is no more free These are actually binaries this is Here we go. Keep start is at B938. We've got up to C7 So we actually have a room for a couple more buffers Okay, so So where does the process Table live? So this is the single tasking scheduler This is the multi-tasking scheduler what's probably happening is something along the lines of a Task being incorrectly swapped back in after it gets swapped out Because in the single tasking mode tasks never get swapped in unless they wake up from a fork then maybe It's not provoking Whatever is going on P tab K data P tab size is Not in here right if not defined you get 16 That's fine. So I'm still Not at all sure why it is crashing at least now it doesn't take so long to start up, which is nice So here you can see it do all the swaps in and out so in it This will be SH physics Hmm back to a foot was to cry the back to SH the next binary Back to In it Etc etc etc until eventually we get to this one Where we're trying to swap in process 3 Which here has been swapped out and then it falls over at a ROM address 3b 5 5 is Here you are tx1 char. Why is it? Even going there that's a null pointer D reference No, I don't really follow what's going on there. This doesn't look like this bit of code it's possible that this is Well, you can't move any of the memory objects around so and that's wrong So that must be wrong so it can't be around cache thing and then it bails a slightly different address Here oh, I know what's happening Something's going wrong It's trying the ROM is trying to dump a message and It's potentially going wrong because we're using the you are Okay, well, there is one thing we could do about this which is here in Devices dot see we can do So this wants to be a we then want to Halt okay, these are all dummies so we just want to Spin with interrupts off. Okay. We haven't read any of the special registers and that was a warning going past Okay, apparently I haven't to find Any of these these need to go in This header file Dev SD in it needs to be is actually defined in That which is actually a one of those Okay, fewer warnings. So we're like this won't double fold Yep, and we get a much more sensible error message the next thing to do is to dump the registers and the virtual address but 2128 AE 2128 Is not actually at an address So I think that's happening in here somewhere. So let's just print the the registers So that's a zero SP A3 We can't use a loop here because they're not necessarily Contiguous these should eventually be delivered to either the process as an exception as a signal or Or if they happen in Kernel space, which this one is I'm not really sure what we do kill the process panic probably panic With no memory protection There's actually not a awful lot you can do to recover from something like that It's usually best just to halt and fail rather than to Have try and run with a corrupted system, okay, so I Know why that address didn't match anything. I forgot to rebuild the disassembly So 28 fe is this address. Yep. It's the one after Unix syscall A14 is garbage So a 14 is corrupted Signing these up So yes something in the fork is Not preserving registers under some circumstances Some very repeatable circumstances So it doesn't seem to be an exception An interrupt because it always happens exactly the same time and besides we didn't have any interrupts for a long time read special register, I think it was called the adder into Address register into the adder the comma there remember to include Print f okay, it's not called the adder Would I put ocular here? What was the exception registers called? EXC EXC viadra Okay. Yeah So it's trying to dereference this using this okay that is Sensible enough The question is why and the answer is I have no idea all the same reasoning I had before applies It should never manage to return that far with mangled registers is probably whatever it is it'll be something incredibly simple and hard to find so I think what I'm actually going to do is to Put it back into single tasking mode the only reason you would ever actually want to run multitasking mode here is for Pipes been really nice stuff pipes working But I think I am going to declare this code complete because it essentially is oh, yeah, let's just turn this Tracing off So this particular project I think is now finished. I mean they're still debugging to do but That is a different phase. We knew have physics working on this ridiculously tiny system quite well it may forms a perfectly comfortable if rather small system to use not the most stable but I It's not like I've put any efforts into de-wogging this There's levy. Oh, we've got a fourth now Cannot execute Really that does look like a binary It's the right size Seven cave code nine cave data Why can't it execute it because it's not executable? There you go fourth This is mine. I'm very proud of this Yeah, I'll warrant that most of the stuff You've seen today has never been done in one of these before because frankly no one would really want to So let's try and sum up I spent way too much time trying to make the SD card work and I still don't know why it works. I Hate working with SD cards. They are just awful things Even with a logic analyzer, they're impossible to debug I Mean I have just cut and pasted the Arduino algorithm for figuring out the clock and The numbers it comes up with do not make sense, but they seem to work so Maybe the documentation is wrong Maybe I'm just not understanding how it's all supposed to work But I mean their code for calculating the clock frequency is coming up with a solid zero for all the results And yet it works. So who knows? It's a bit of a nasty mess of Arduino stuff just these and ESP SDK stuff, which is these That could be cleaned up. So I'll do before trying to Upstream this it looks like Sector receiving Sectors being passed to the Block device driver are always aligned which isn't nice because that saves us some annoying code Um So the since the last to my touch physics It has changed and there has been some bit rot So I have had to fix a few things on the way which is a bit of a shame It's a hobby project AT is by the I should add not mine. I should said this several times. It's based on some very old code by Well, it's in the banner here The original Uzi is 1988 onwards and then got abandoned about 2001 that worked on Z80s and then these two picked it up and Improved it dramatically and made it cross-platform Despite being so tiny we have a 48k kernel Approximately 50k yeah It's certainly creeps up over time, but despite having a 50k code kernel it works pretty well and Even on the system this small gives you a pretty comfortable environment It's pretty easy to port the abstractions are fairly thin but present where it's useful This is the second Major port I've done. I've also done a Z80 port to the NC 200 and The hardest bit is in all well, I didn't have to do the Z80 Tricks to S but on this and the MSP 430 Switch in switch out stuff was so much work The MSP 430. I think does have preemption I can't imagine why I thought that was a good idea Preemption is even worse because you have to do all this from inside an interrupt handler as well I think what it actually does there is it fakes a it fiddles the Call stack so that when the interrupt handler returns it actually returns to a trampoline function That calls switch out So that happens in Outside interrupt context But you have to allow for switch outs to happen anywhere in the kernel So I've been a bit fast and loose about Interrupt safety with this because we don't have to worry about that kind of thing. I Hope that's not causing us our problems with multitasking mode The FDL stuff I did was a complete red herring it wasn't too much work wasted and it did Mean that I understood how it all worked rather better the this Dara library is an absolute find it's small and simple and Does exactly what I wanted to do Although learning about its quirks was a bit of an issue. I should have realized that it wanted Lots of free space so that can add lots of free pages But stat works, let me just try and mount my file system again. Yep, absolutely no trouble Just works Not understanding how Mukafes works was stupid and I wonder if it's worth trying to adapt the Mukafes program to understand Linux hard drive geometries or at least seek to the end of the device to see how big it is There's that whole get GOI octal, which is intriguing Yeah, I keep forgetting that you have to use the block device name No, you don't Why is that not working? Yeah, there's a bug there that needs investigating There should be error messages But yeah, I think that's worked out quite well. This is the This we're up to 15th Episode I believe Switch is I Thought it was only going to take maybe a week to a week and a half but we spent a lot of time on the FDL stuff and a lot of time on the SD card so that yeah You know Hofstatus law, which is that Everything takes longer than you expect even when you take into account Hofstatus law So I think that's come out about right Hmm Well, and I'm going to go and do some cleanup and that's going to be dead boring And I'm not going to put it on video. So this is going to be the last one I Am curious to know if anyone has actually like sat down and watched or is listened to all these videos my Programming videos seem to be more popular than my bench videos But as I prefer making the bench ones. I'm going to do them I'm going to do programming ones as well, but Yeah, I suppose I Hope you all enjoyed watching this video and all the other ones if you have watched the other ones and Please let me know what you think in the comments


Hi, this is Edna Cole. I come from the Philippines. I first learned about democracy from the classroom. But in the later years, the size, the color, the texture, the breadth and depth, the universality and the particularity of democracy and democracy assessment, I owe it very deeply and almost solely to the International Institute for Democracy and Electoral Assistance. I'm happy that I have come to know about international idea. I will forever be grateful to you and be pleased that I have been part of international idea for some years here in the Asia Pacific. Congratulations, happy anniversary and more power.


Hey guys, we're back for number three in the Friday the 13th film franchise and this is the best one. It's also in 3D. It's also in 3D. Basically the story of do it the same story three times over. Eventually, hopefully, the third time is going to be decent. It's good. I really like this movie. This is one of my favorites in the series and Jason finally gets his mask. We finally have to like possibly the most iconic thing in horror film history in the Jason mask. And what's so funny about it is it was so dismissive of when they did it. I didn't even notice when he put the mask on. I was like, wait, he's got the mask? Oh yeah. It takes it off and the hand just grabs it. And I was like, oh wow, okay. That's usually how it is sometimes with the origins of certain ideas. I'm not even sure they ever thought of it as anything. They basically, they didn't want to do the bag head again partially, I assume because they didn't want to rip off Taladred Sundown again.  So they wanted their own thing. Yeah. And you know, and the William Shatner mask was already taken by Mike Myers. So this one is apparently a day after the second one. So I guess it starts a day after. Oh, it starts a day after. And then they get, the couple gets killed and the day after that. So it's Sunday the 15th.  He's got quick healing abilities. As for characters again, they're completely really non-existent. They are literally meat shields, but some of the girls actually we confused. Yes, because they look so similar. But there are some elements to certain characters, like for instance, Chubby Garfunkel.  Otherwise, nothing else. And then when he actually dies, it's a really funny case of a boy who cries wolf. And then there's the main girl who lives through it. And she's actually pretty awesome. She's a badass in this movie.   She stabs him and attacks him.  Like going, she fights him. And she hangs that motherfucker. Yeah, it's great. We were like, hang him, hang him, hang him, hang him. No, you are cheering for her throughout this movie. Despite the fact that I regularly say this series, you're supposed to cheer for Jason. Yeah.  And it really, it becomes that.  You do get a lot of cheering for Jason. But I like that the way this movie ends, like you're cheering for this girl. Yeah.  Yeah, she's a real driving force. And she can, she's got a survival element. She, yeah, when she hang the guy, I was like, are she actually going to do it? He totally thought he was going to stop her, but no, she full on hangs that motherfucker. I mean, it's Steve Minor, who got better as a director in two, in a year. I mean, I know they had more money. It's much better. It's better. It's, yeah, the production's better. You can tell he's a more competent guy making this film. The pacing is much better. I actually did not get bored. The beginning is a little boring. Well, the beginning is a little boring. Drag out the old couple of the grocery store farm thing. Yeah, but also the first five minutes is literally ending. We didn't even have fun of that. We definitely should have made fun of the fact that once again, like after the second one, it is previously on Friday the 13th. It's not, it's not a bunch of like current day than memories. Yeah, it's not like a dream job. It's literally just, but not the all the way end. They let, they add a scene after he died, like it's apparently, he got the pull of the machete out, which I guess is theoretically before he goes back and dives through the window at her with hair. And for some, oh, he also shaved his head in this movie, apparently. Yeah, he's got hair in the second one. Yeah, he just had all this time to do all this stuff on the side. We have a giant hole on his shoulder. It was funny too is because of the obvious 3D element. It's not shot. It was shot for 3D. There's no 3D glasses. So we didn't get it. Unfortunately, we don't have, yeah, however, didn't damage our vision tonight because of how much there was. It just made it really funny.  I even the very first one where the old guy grabs the broom, he's like, just for no reason at all, like, leans it towards you. Like, he looks like he's aiming, like, make sure, don't hit the lens, don't hit the lens. But it's, it's, I mean, we got to talk about the deaths. I mean, that death of Rick, I think his name, like, just getting the head crushed and just like, that was great. And it's got like, I love the, they do have the guy that for whatever reason likes to walk in his hands, and he gets shot up through the glass and just right down. Yeah, that was a great one. The gore is better, the kills are better. I like the, the first kill with the Jason mask, where he just walks up, points the thing, shoots her through the eye, Mike drops it and walks away. Yeah, just like, just like, what did I say? It was like, that's a very casual walk for a serial killer. Just like turns, yeah, did that. All right, moving on to the next one. So there's some good deaths in it. There's a lot of fun.  You gotta find a screenshot of it. The shattered screenshot kind of looks like someone tried to make a Wu-Tang logo.  That's what the Herbie got. Yeah, that's Herbie the, Herbie the love bug got some Wu-Tang gangsta in this movie.  There's some, the characters again, you don't care for, but overall, this is a much more enjoyable film.  Yo, I don't even remember that, yeah. They like, talk about it at the meeting and they just like, it means nothing. Oh, there's that random memory about seeing Jason earlier too, which is like, what, what, what was that? What did that have to do with anything?  None of the characters mean anything.    There's a lot of fake outs too. There's times where you think that is all they're gonna kill, like, no, you didn't. And they're like, ducks.   And I like it. It's cool. Like, they have fun with it. There's bringing humor into it. It's got a lot of jokes. And we got 12 deaths in this one, which is the most so far in the series. It's definitely an enjoyable film. We were laughing, we were like, yeah, we had a lot of cool fun moments with this film. And I'll definitely say I didn't feel tired at all throughout this. So my body trying to fall asleep for these movies was working in my favor. Yeah. It was this one. I mean, it's the, it's the best one so far. It's the best one for a bit. You'll see. I mean, we get, we get, we get the Cory next, but this movie is a ton of fun. I'm going to throw my rating out first. I'm going to give it a five because I really like this movie. It's still not good, but it's, it's fun and it's like the hand, the guy on the handstand is probably one of my favorites in the series. That is a great guess. It's not my favorite, but it's, it's up there because it's really cool.  Like that's, that's really cool. And there's just some fun moments. And I like the, the shots they do. Like when she gets the door open and you and your roommate were like, Oh, he's going to, I don't want that. I don't want that. And he's just still hanging there dead for a moment. Like it was a good. Yeah. Right. There's a lot of them. They build up. Literally good build up. They do it well. I think it's a very successful horror film. Your roommate jumped in one moment. Yeah, she did. I'll give it a four. I'll say it is a good movie. It is an enjoyable time. It does have some stupidity to it. But the thing is, I don't know if I'll be able to ever rewatch it again with the same invigor. If I'd watched that by myself, I would have been bored. But because we had that group environment, that's the best way to watch horror. Exactly. So guys, that's our review for the third Friday, the 13th movie. Now we'll be moving on to number four. Does it have a name? I think it's got a name. I don't remember what it was. Felbender? Where did you see Cory filming in these movies? You know, pre-loss boys or post-loss boys? I believe pre. It's pre-goonies. So it's got, yeah, it's got to be pre-loss ones. Oh, wow. The reason he doesn't do the full one of the fifth one is because he was filming goonies. He actually like left on weekends to go film the fifth one. Oh, wow. Yeah. Shoot. Well, all right, then we got that to look forward to. To reference my trailer, it's the height of his Feldman hour. Mark and Steve, go check it out. I think this is going to be the shortest review we've ever done. It might be. Yeah, it might be. Anyways, guys, I'm just going to throw another plug, creepy quarter of pictures, Mark and Steve trailers. Let's make this movie. All right, guys, we'll see you on the next one. Thanks for watching.


La la la la la la la la la. Three four, one two, three four, one two. Three four, one two, one two, one two, one two, one one one one. The East Montpelier and Woodbury Fire Departments are standing by and making this entire production possible. Now for our last number, we're going to play our smash hit and it's called smash hit.  On Tuesday night I'll be at the Continental, Wednesday at the Red Apple, then Friday night right around the corner at the Pontiac. And all of this can be found on the activities boards, so you can find all this information of all the various events and activities that we've got going on here. And folks, thanks again for coming in. This place is perfect. Whatever you say, boss. This is my uncle Herschel and his 60th wedding anniversary. If I had wanted a virgin something, I wouldn't be hanging around this jar. It was about a year ago this time and the year before that too. Hey, yeah, I've been coming here for a few summers. You know, Sam, you look pretty sharp in this jacket. You look like a guy who could buy a girl a drink. I haven't bought a drink here for myself in eight years. Sure, Angel, but that's all I'm good for tonight. I got a woman, and if I'm not back in our room by midnight, there'll be no sugar in my coffee for a long time. That's all right, Sam. You know, Ronnie Grimes is coming, and he is single, and I hear he's got a lot of dope. So now you're going after traveling musicians? You know, they don't make the big bucks. They're dead desert. No bad boys. What are you doing tonight, Herschel? Well, I'm off that bonfire, and then I'm going to try to win that limbo contest. So I'm going to get me a trophy, and then we're roasted marshmallows. It's a pie. It's more than I do, but a little bit longer, and then we've got to wash dishes at the end of the night. I have to wash dishes one more night, and then we can flip my leg. How have you been tonight? Not too bad, but it's never enough. You know, every year it just keeps getting hotter and hotter to pay the bills. It's different this time, you know? Last year, the hideaway closed. I heard that the end of the season was sky-poppy, and it closed in many years. Who knows? I promised that it was desperate that we keep this place alive, and hand it down to Katie. I can't let him down. You know, we always find a way to make ends meet. What makes you think they're going to sell you the place? Haven't they had it for 30 years? Has it been in nine toes? Tony, that bog, a shark-baked guy? No, for all. Lead pipe, Louie, I'd like that. We should be able to buy it for a song. Hey, hey, isn't that song about the birds? You know the one about the... hold on, hold on. Orange, boss, what's your favorite flavor? I like raspberry. And that yellow one, I think it's lemon. Oh, I love Joey. Tony Bennett was here? Pop even once booked Old Blue Eyes. That's what we need right now. A big show, something like that. You know, one big name. We could fill this place with big tickets, and we'd be set for the season. Yes, the promoter from Chicago. He owed your dad big time, and your dad never called in that favor. Gus? I haven't thought of Gus in years. I know he's still handling some pretty big names. They did owe Pop a big favor. I mean, Pop really helped them out. You might be able to call it in. This just might work.  I'll call him tonight, huh? Hello, Mrs. Roberts, so I could call you future mother-in-law, Roberts. Today, we're going to have lunch at Father's Club, and then a moonlit cruise on the new criss-craft. And the caterer mother uses is preparing dinner as we speak. Oh, by the way, Katie, what do you prefer? Caviar or Cornish game hen? Why can't we just the two of us cook some hot dogs on the beach?  When we're married and you have all the finest ladies over for tea, are you going to serve them hot dogs, too? Who says we're getting married? Well, I do. And I always get what I want, silly. Anyway, I've got to go, but don't be late. We're going to meet grandmother at Father's Club at noon. So you two are talking marriage? Well, he is. Wouldn't that be great, huh?  And long before we're gone, after we're gone, huh? Who would kill me if anything happened to this place? And Clifton says he loves me. Hey, isn't the new dishwasher starting today? Yeah, and he should be here any minute. And if he doesn't show up, Katie, you're going to have to watch this just a minute, OK? OK, daddy. All right. Oh, good morning, Yvette. It's a beautiful day. Oui, c'est bon. A perfect day for staying inside all day and waiting on tables. Oh, Charlotte, hi. What's with the roses? Good morning, Miss Anna. So today is me and Joe's wedding anniversary. Of course, I forgot, but he remembered, and he placed these once beautiful long-stem, thorny, red roses on the front seat of my car, where it's dark in the garage. And he kind of sat on them a little bit.  You know what, I'm going to chop. No. No. Chalk's my guy who owns that Chevy dealership in Pittsburgh. No, I'm talking about the rich one, Dave. You know the one with the old family money? The one I was really hoping would make me an honest woman. Oh, I'm sorry, dear. Did you love him the most? Love. Don't you care he has old family money? Money can't buy and love. Yeah, well, it can buy and get diamonds, and that's pretty darn close. It's Sam. So Mrs. Hansen, she's pretty tipsy again, so she falls down. And that leaves just me and this Sam thing. So I'm thinking, I can do this. I'm going to do this. And Sam goes, and he's pretty good, but then he falls down. So I'm thinking, I'm finally going to win a Pocono Mountain Resort trophy. So I'm under there. I'm under the stick, you know? And I'm going to win this limbo contest. I'm under there, and I'm really doing it. I'm doing it. And then her marshmallow catches on fire. And so she blinks it. But then the limbo stick catches on fire. So I'm under there. I'm thinking, I'm still going to do this. I'm doing this. You kept going? Yeah. And I can feel the fire. I can feel it. I'm going to win this thing. And then I remember only one little awkward, had explosion, and you disqualified me. I got a joke to tell ya. Alright kiddo, I'll make it quick. Okay, how come your both cracks goes vertical instead of horizontal? I don't know why. So when you slide down the hill, it doesn't go, blblblblblblb. Listen, give me a favor. Just sit here and reach for this for a minute. I'll hold you very long! Please, be good because I really need this job, okay. Okay, let's put it up. Hey, it buried your pie. I don't know who you are, but you've got a kid to hide, all right? Oh, all right. Room over here, okay? The kitchen's over here. This is the sink here, and the scrubber. There's so many things over here. What? She's French. There you go. There's going to be plenty of dishes up the bar, and a big show coming up tonight. But I can't... Who's this kid? Yeah, that's what I've been trying to tell you. I had to bring him with me, but I can take him back to my sister's house, drop him off, be back at five, and you can work all night if you need me to. All right, five o'clock's good, but listen, I'm going to meet you here every night this week. We've got big shows, hopefully we're going to have lots of dishes. Yeah, great. It can work as much as you need me. I just might have to bring him with me sometimes. Oh, that's fine, and we'll have to have a little one. Really? All right, great. I'll drop him off. Be back at five. Oh, that's a good dishwasher. Can I talk to you about something? Sure, what's my old peppermint gut on the mind today, huh? How did you know that mom was the one? Why? Remember the first day I saw your mom? It was a hot day, summertime when we were painting the tennis courts, you know? And all I could think of, I'm painting the tennis courts, sweating in the sun, and thinking, I'm going to get a root beer float at first break. So I went downtown, I went to AW, and my mom had just moved into town, and she was working behind the counter. Walked through the front door, and I saw her behind the counter. I forgot what I was there for. I knew from that moment that I wanted to spend the rest of my life with her. And fortunately for me, she felt the same way. Why? Well, you know, Clifton's been talking about marriage, and I guess he's a good guy, and I know we'd have a beautiful home, and our kids would go to great colleges, but I just don't know. I never had that moment when I just knew. Well, you know, not everybody's relationship starts like me and your mom's.  And Clifton, that kid's got a lot going for him. I mean, his family is rich. I mean, financially.  I guess. Oh, I'm late. Grandmother doesn't like it when you're late. She seems like a nice kid. Her? She's the greatest. What can I do for you? It's a nice place you got here. It is. We like it. How many square feet is the whole place? It's about 15,000. Now, how old is the roof? The roof? You got a loading dock? Maybe. What's it to you? You don't happen to have an underground secret climate controlled storage area to me. What's this all about? Who are you? My name is Bernadette Delmonico and this is my friend, Antonio Valentini. Or as I affectionately call him, Shrenty. How are you doing? Attention that the Pocono Mountain Resort has hit the skids. Taking a nose dive is going belly up. And I think this place would be just perfect for my let's call it business adventure. And I'm prepared to make you an offer that you can't refuse. This place is worth twice that. You want to break a couple of kneecaps? Bust some fingers? Let shoes cement overcoat? Perhaps an unexplained accident. I know. I could burn this place to the ground. You knucklehead. We need the building.  I'll call the cops. Just take my card. I have a feeling you'll be calling me soon enough. Come on, Shrenty. Oh, for God's sakes. Come on. Harry, who was that? Couple of knuckleheads. They made me a lowball offer on this place. What did you say? I told him to go to hell. No. For I am hard at working. And I wish to not attract attention. Good job of that. I am at the lookout for danger. How many would do? How do you say do? Two. Two? Two.  Anyway, I am on the lookout for two dangerous knuckleheads. They are the smugglers of the precious pelage. A firm manufique from Northern Quebec. And I have reason to believe that perhaps they are staying right here in this stable small. Did any of you have been seeing them? I don't think so. But we'll keep our eyes peeled. And to launder the mummy. Therefore, here perhaps myself I am staying here. And I will peel my own eyes after the Royal Canadian Mounted Police. I am here for smugglers. Welcome back. I got some time before the show starts. I'd love to. But I have a ton of laundry to do. And Harry wants homemade chicken hot pie for dinner.  He won't let me touch the checkbook. Jesus, what is this? A 50's? Anna, this is the 60's. Have you even heard of women's celebrations? Does Harry ever cook for you? Does he even know how to do laundry? You listen to me, Anna. A woman's happiness is just as important as a man's. But I am happy. I love doing things for my family. I know, I know. And Harry is a great guy. But times never change in. I'm here for a drink. What can I get you? Oh, I don't care. Well Miss Starlight, I noticed you don't have the backup singers. Where are they? Oh, this gig don't pay enough for me to travel with the twinkles. Well, um, I know four girls that would do it on the cheap. Girls, she said. It's so nice to meet you, I've got all your records. It's nice to meet you too, kid. Well, with all the money that guy's got, that ring better be the size of the rockage of Walter. Have you set a date yet? Whoa, he hasn't even asked me yet. What? I know Daddy would want me to accept, but I'm not even sure that I would. Shouldn't I know that I'm in love? Yes. You should know that you're in love. This is your life you're talking about. Remember that?  But, you know, it's up to you. It's up to you. Do you have any glasses up here? Oh, no, I'm all set here. Thanks, Bobby. Where do you come from, anyways? I was in Brooklyn until last month. My sister, she lives in Hazelton. She's been having a hard time lately. She's a single mom. I really needed some help. So I came here to give her a hand with my nephew Quinn. Aww, that's good. Yeah, actually, a couple years ago, a blue note. Oh, that's right. There's two kinds of people I never forget. People with talent and people who owe me money. Yeah, that's right. I remember now. You were singing with the four aces. You were good. Thanks for remembering. Are you singing it all now? No, I just got the job here doing dishes. Got to pay the bills and take care of Quinn. Oh, come on. The guy giving talent like you got? No kid, you got a thing. My buddy Jack, Jack and the swing daddies. He's like a new talent. He's holding auditions next Friday, the 20th in the city. I'll look you up. Wow, thanks. I can't. I just started the job here. It's way too early to ask for a day off. Plus, I got Quinn. Oh, you're leaving Quinn. I'll handle my dad. Just leave him to me. You've got to go. Wow, that's the best. It's fate, little man, meant to be. I'll get you his number, but you're big. At least for the audition. Trust me. That's right, little man. I think it's time for you to go back to your dishes. What is the difference between a dishwasher and a musician anyway? I think they're about the same. It reminds me of that joke my father used to say. A meatloaf is like a musician except the meatloaf can feed your family. That's it.   Muffin, I wasn't talking about you. I know that you like to sing, but you would never do it as a career. That is enough. I'll see you later at the club. I don't think so. I'm going to stay here tonight and help doing dishes. We can talk tomorrow. Muffin! I said tomorrow, Clifton, and I meant it. I can see very clearly why you're having doubts about that one. Uh-huh. Well, it's time for me to go and live the low life. My show starts in 20 minutes. I sure don't want to miss that lesson with Hans. Let's see if I can find some rich guy to buy me dinner. Daniel Carnegie is probably coming tonight. He is how we say dirty with the money. Any of them do it. You mean he's filthy rich? Very filthy, but he is a very nice man. He's a very nice man. Good evening, Mr. Carnegie. It's so nice to see you. How do you hold up since Mr. Margarit has gone up to the sky? I'm doing okay. I'm glad to be here. I remember how we she used to dance. Remember how she used to dance? Steve? I remember. She wants to make that beat. Yes. I'm glad to be here at the club tonight. Could you get me Tom Collins, please? Certainly, Mr. Carnegie. Anything for you? I don't know. I couldn't help but overhear. Who's this Miss Margarit you've been talking about? She was she was Miss she was the one with I spent 20 to 65 of my wonderful years with her. And she's dead, right? Yes. Oh, I mean that is so sad.  Who care to join me? I think not. Nice. Okay, suit yourself. You can almost smell the money from here. I'll distract him. You go for his wallet. You know the drill. Oh, this ought to be good. Okay, Mr. Who? How you doing? That's nice. You're here to see the show? Well, I did it, Kawinke. Me too. I'm trying to be, yes. It's, uh... I hear the farm roof go here. It'll be $2.50, Mr. Carnegie. Wait. I'm very sneaky. You should be working. Tell me. Are your mother's hands as soft and beautiful as yours? Why are you here? She's a show. Oh, it's a show. Do you kind of see it? Ladies and gentlemen, welcome to the Catholic Club here at the Pocono Man Resort and Hotel. We are very pleased to see you. Resort, don't forget tomorrow morning we're going to be doing that and crafts at the Pavilion, which will paint them a shape project. You'll be able to read all about it. Right now, let's welcome Ms. Linda Starlock. Like I said, I could call you, but maybe I'd be able to call I didn't if I really needed it. You know, we're all good, but the club's another map. We really need a real shot in the arm here. We need a big app. Yeah, something that'll just fill the great house band. Tommy Rocket and the Blasters, maybe? Hold on, hold on. Ray Letts will be here Friday the 20th. The tour bus will get here at 8 p.m.  You're going to send the lead sheets and the costumes and all that. This is amazing.  Thanks so much. Thank you so much. Ray Charles and the Ray Letts are coming here Friday, 8 p.m. Ray Charles and the Ray Letts. Ray Charles comes here to do a show. They're going to take a boatload of money. And then they'll be able to pay off the mortgage. All right, then.  But boss, isn't that serious? Couldn't somebody get hurt? We ain't never blown up nothing before. Welcome to the big lead. Your chiseled chin and chest may weak by sure to dazzle. Your best take care be nice and pay attention. Or else make out Salted me by saying I was tawdry So I shall admit Salted me by saying Rhyming is something very funny. Well, you mean I like his rhyming, but you got him and he's a good singer. Oh, you think you could do better, Frenchie? I'm starving, honey. What's for dinner? How about maybe you sometime making me something to eat?  Look at these two over there. Look at the sleeves they are over there. Looking at your two kids. Listen, your mother and I are going home, okay? Dad seems like... He did anything for me. He did it all. My school plays, field hockey. He always had time for me and read me a story every night. And my mom, she's every bit as great. But what about your dad? Where is he? My dad was never much of a dad, but he's probably seen a couple of times a year. That's enough. What about your mom? She died when I was a kid. Thanks for watching Clint for me Friday. Talking to your dad so I can go to the audition. No problem. Anything for you.  I have to get you, doll. Are you... dating that stiff I saw around here the other day? Hey, no need to get ugly. But, yeah, that's Clifton Vandu Little Haven't you heard? Dazzling, darling, dreamy Do little diamonds I can't believe I just did that. It's all a bit much, but Daddy thinks Clifton is great. He wants to see me secure. Yeah. How about you? How do you feel about him? Make you feel like... Of course I... Hey, take care. It won't be long, alright? Actually, doll, I'm going to look at the master key. And do not question my modus. The dynamite is already at the bridge and set to go off at 7.45. At which point... How long have you been standing? What did you hear? Did you hear our plan about the bridge? But did you hear how we're going to stop the show? Bridge, I'll show you. Shebi, she knows about... I was supposed to meet me at Grand I think she's mad at me. I said some things the other day about musicians and she got quite... She seems different and smitten with that new dishwasher you hired, but I can't... I can't figure out why. Well, I don't know, Clifton. He's a down-to-earth kind of guy and, you know, honey, you can be a little bit snooty, don't you think? No, no. It's just the way we are. We? Well, you know my... Never mind. Just tell Katie I was here when she decides to make an appearance. Hi, Yvette. Hi, Charlotte. Well, Clifton just left. I guess there's trouble in paradise. Oh, do tell. Katie might be losing her desire to be amongst the upper crust. I don't think she's really interested in marrying Clifton. And why should she? Like Linda Starlight says, it's the 60s and I just wanted to be happy. So you think Katie's getting tired of that little fellow? Yes. I think she's getting tired of that little fellow? Yes. I think she might be... Clifton thinks that she has a thing for Bobby, the new dishwasher. Listen, just between us don't tell Harry but I like the dishwasher a lot better than I like Clifton. We all do. So, but you know what I'd like to do to that little Clifton? Oh, oh. Oh, you'll do great, I know. Oh, this is Ray Charles' jacket. It matches my heart. You guys, you've got to get to work. We've got ten songs to learn from the big show tonight. Ray Charles is the biggest name in the business and we cannot let him down. Damn. Now we'll look great. I'm here for the re-lapse. All right, everybody, get back to work. We've got a big show tonight. Anybody seen Katie? She's late. We've got a big show to get ready for. I haven't seen her all day. She's late. Where could she be? Oh, not now, sweetie. We're trying to find Katie. What about her room? Have you checked her room? I'm sure she'll be there. She hasn't shown up for work. She's late. Nobody's seen her so far. We're starting to get a little worried about her, to be honest with you. Yeah, if Katie was my girl, I'd never let her out of my sight. Yes, well, Bobby, she's not your girl. She's mine and I'm going to make her mine forever. Yeah, well, she hasn't said yes yet. What is it? Do nothing? It's not do nothing. It's Duke. Not right now. Can't you see that I'm busy? Her bed wasn't slept in, Harry. She didn't come home last night. Um, we haven't checked the boat house yet. She's probably just at the boat house. I cannot find enough of her as ramped as a field. Jock, it doesn't matter. Katie's missing. Jock, listen, we've got to go save Katie. What sounds really, really dangerous? I think somebody should probably stay here. I know.  Yvette, tell Harry and Anna we know where Katie is. We're going to save her. But, Bobby, your bus, you will miss your audition. That doesn't matter now. Come on, Jock, let's go. That's where she is and he's going to get her. Oh, my God. That's good. She's okay. All right. So, what about race bus? Right here? Nobody knows. All right. Open the door. I'm sure they'll be here soon. I want to be here when the proverbial do-do hits the proverbial fan. No, boss. I feel really sorry for them. They're losing the place. I kind of like them. To be quiet. I want to see the people's reaction when the bridge blows in, uh, in five minutes. What? What? What? The girl! The girl at the bridge, boss! We've got to go save the girl. Just sit down and stay where you are. Did you really think I was going to let her go and laugh? Besides, if we wait now, we just get blown up, too. That's it. You two-bit want-to-be be rated good-for-nothing-mean-old-had-eye. We'll leave one minute this way. That's what really matters. That sound that you heard, that explosion. That was the bridge blowing up and, uh, Ray's bus is on the other side of that bridge, so he's not going to be able to get out of here. No show. No Ray, no show. From here on in, I'm going to have to tell you that all future events here at the Pocono Man Resort are canceled. Have an idea. Bobby, come on. My daughter here's got a good idea. It seems that we've got a good singer here. Linda Starlight recommends. And since the bridge is blown up, you're all going to have a tough time getting home tonight when you're already here. We've got a show for you. You know, it's not Ray Charles, but it should be good. And if it's good, great. And if not, we'll give you your money back. How's that sound? We're going to set up for it, okay? Just give us a minute. Bobby, we have that correctly. We've got something good. We're on the spot. We've got something. We promise that I died. The bulk of our state would be left to you. But it looks like if you do, you need it now. Mr. Carnick, you like him so much. Thank you. Thank you so much.  I like it here, so could I like stay with you? I mean, I think I'd give anybody who helped say, well, Katie, second chance, huh? You know what? Bobby's going to be singing up on stage. So we need another dishwasher. You can take Bobby's place, all right? Okay, all right. Could you call me, Antonio? Sure, whatever you like. I have some ideas about this place, about your county. If you amortized the mortgage over seven years and 50 years ago, and you say it's on your portfolio, these times, what's going on here today?  Now we're sad, you know, amazing. But with all that's going on, what do you make for dinner? Well, I was busy, too. How we make something together. You know, it's the 60s. It's time to dig out the trash. A two-month rail to search out the stolen furs. You'll never see in the river every year, by the moment. You should come with me. I'm sure it's going to be mad at you. I'm forgetting something. I know you came in last.  But this is for perfect attendance. Oh!


In this presentation, we're going to talk about special journals and subsidiary ledgers. First, we're going to list out the special journals and talk about when we would use them, why we would use them, and how they fit into the accounting system. The special journals are basically going to group types of transactions. So when we think about all the transactions that happened during the month, we typically see them in order of when they happen in the accounting system, we're going to record transactions in other words, by date as they occur. But if we are able to group those transactions into special journals, that can simplify the process, the types of special journals will typically be a sales journal. So we're going to recruit, we're going to group sales transactions, in other words, into the sales journal, then we have the purchases journal. So when we make purchases, we will group those items in the purchases journal, the cash receipts journal, so any transaction where we receive cash cash is going up, we'll go in the cash receipts journal, and then the cash payments journal, anytime where the cash is going down when we have cash payments, we're looking at the cash payments journal. Now, why would we do this? We've seen accounting systems in the past, either a manual system or an automated system, where we haven't seen so much of the special journals, why would we want to implement special journals? The special journals are usually going to be used when we're using more of a manual system, because it's going to be designed to limit the type of data input that we have to put in place. Now, if we are using an automated system, it's still really important to know different types of accounting systems such as special journals for a few different reasons. One is that when we process reports and print reports, we often want to see them in a similar fashion as the special journals that we will see as we make the information. And two, it's good to see how different types of accounting systems can be set up to be able to tell what accounting system would be best in a certain situation, and in order to know what is crucial to an accounting system and what could differ in an accounting system and how to make those differences and those changes, those tweaks into whatever accounting system that we are putting together. So when we think about this as compared to a manual system where we enter everything into the general journal, this is going to save time by allowing us to set up special ledgers, which allow us to put less information into the ledgers, allow us to not have to put a debit and credit in each transaction as we go and not force us to post that then to the general ledger and then to create the financial statements, but instead to wait until the end of the time period, sum up what is in the special journals and then record that activity. We'll talk about that in more detail as we look at these special journals one by one. We also want to take a look at the subsidiary ledgers, and these are going to be things that anytime an account needs some added need to it that's not given it by its controlling account, typically the general ledger account, then we want something like a subsidiary ledger. The examples that we will be working with are the accounts receivable subsidiary ledger and the accounts payable subsidiary ledger. Now these are going to have similarities in that, for example, the accounts receivable subsidiary ledger is going to give us more detail than we find on the balance sheet or the trial balance or the general ledger. In other words, if we were to see an amount for accounts receivable on the balance sheet, say 10,000, that would represent people owing the company $10,000. However, the fact that it's on the balance sheet doesn't give us a lot of detail. We could get more detail by going to the general ledger as we can with any account, and that would give us the detail by date. But of course, what we really want is the detail by customer. And in order to get the detail by customer, we need another type of ledger to do so. We'll call that an accounts receivable subsidiary ledger. Similar story can be made for the accounts payable in that accounts payable represents who we owe money to, but the amount on the balance sheet doesn't tell us much more detail than that how much we owe to somebody. If we want to know more detail, we can go to the general ledger, which will give us detail by date order of transactions that made up that amount on the balance sheet. But we also want to see it by who we owe. We'll call that by vendor. So those are going to be the subsidiary ledgers. We'll get into a little bit more detail now in terms of the special journals and the subsidiary ledgers. The sales journal could look something like this. Now remember, what we're doing here is we're grouping everything together. We're going to take all these transactions and anything that has to do with a sales journal type transaction, instead of recording a debit and credit into the general journal, posting it to the general ledger, creating the trial balance and the financial statements as we go. We are just going to post this to the sales journal, which is designed just to accommodate a very limited type of transaction, meaning only the transaction that has accounts receivable and sales can go into this journal. Note the the name is a little deceiving then because really it's the sales on account. If we made a sale for cash, in other words, wouldn't go into the sales journal, even though we made a sale because we got cash and therefore it would go in the cash receipts journal. So we're going to have very limited transaction here. It has to be a sale for on account to go in the sales journal here. If we sold inventory and we have a perpetual system, we would also have the cost of goods sold and inventory. Note we can just record this with one line item here in order to do that. We don't need four accounts as we would when we record the journal entry. We can just record it into these two amounts here. We also don't need to post it until the end of the time period at which point will sum everything up and then make one transaction to the general journal for the entire time period, whether it be the day, the week or the month, we'll be working with a month's worth of data. So we'll enter this into here for the entire month and then just make one journal entry for the entire month's worth of data. So that should save a lot of data input time. Then we'll post that information to the general ledger as we would in a normal process is being the controlling account and use that to generate the financial, the trial balance, which we'll use to create the financial statements. Similar process for the purchases journal purchases journal again a very specific type of journal here. So anytime we make a sale, I mean, anytime we make a purchase on account. So it's going to be in this case just inventory for a merchandising company. We make a lot of purchases are accounts payable. In other words, all has to do with inventory purchases. Then this is a very nice journal because we can just record this in one journal entry format, one journal format here, one record record into the journal here, rather than making a debit and credit into the general journal and having to post that to the to the general ledger each time. So once again, we just record this information every time we make a purchase here and then post it for the entire month or the entire period, whether that be the day, the week or the month, we'll be working with a month to the general journal. Remember that this although it says purchases doesn't mean purchase for cash only means purchase for accounts payable. If we purchase for cash, it'll go into the cash payment journal. So we're going to we're going to be able to save time by recording all this into this journal, then making the general journal at the end, which will be the total of all the transactions there using that then to create the general ledger or post to the general ledger the activity for the entire period in our case, the month, and then make the trial balance from that as well as the financial statements. Then we have the cash receipts journal similar type of process notice it does look a bit more complex, because there could be more than one really restrictive thing we get cash for so the cash receipt receipts journal will group transactions by the process of receiving cash. So that's going to anytime we receive cash that's going to be the driving format. Now hopefully we receive cash or this will be most effective if we receive cash for a limited amount of things such as if we make a lot of cash sales, then this journal will be very effective if we if we get a lot of our cash receipts are all coming from accounts receivable. This will be effective. However, if we get cash from kind of random areas we taking a loan out or the owners putting money into the business and stuff like that, then we might have some other type of accounts and we might have to post it into other and summing this up could be a little bit more complicated resulting in at the end of the time period a general journal the total of each of these accounts being a bit more complex than it would for example the the sales journal or the sales journal, which is going to be pretty straightforward in terms of the journal entry. So this one could look a little bit more complex and again these journals work best if we can really categorize our expenses well and then track all the same expenses and not need any kind of extra columns here or not need too many extra columns. So we'll talk more about that when we go specifically into the cash receipts journal and work through that. Then we would do the same thing here we're going to record the general journal to the general ledger using the general ledger then to create the trial balance which would then be used to create the financial statements. Finally we have the cash receipts journal same kind of story here we're going to group all these transactions together this time by the common characteristic of the cash payment is the cash payment journal. So many times in other words cash goes out of the company we would record it here to the cash payment journal. Again it's a bit more complex of a journal because we could be paying for many many different things cash payments probably the most diverse type of thing we have within our journals because we could be paying for different things such as different types of expenses but it's best to have the journal if we have a limited amount of transactions meaning if our cash payments are going for something in particular most of the time such as buying supplies or buying merchandise or always paying off on account that's when the cash payment journal will be most effective and in any case we're going to do the same thing we're going to enter this information into the cash payments journal anytime we're paying cash and that's transaction and then we'll take the totals and record that to the general journal using that then to to post to the general ledger that will then be used to create the trial balance and financial statements. Now we're also taking a look at the subsidiary ledgers and remember that's going to be the accounts receivable and payable so for example if we look at the receivable subsidiary ledger and this would be applicable to any type of system that has accounts receivable or payable meaning even if we're using an automated system we need more than just the general ledger data and most automated systems will do this automatically but we need to know what the automated system is doing and if we have a manual system then we would have to do this manually we would have to not only have this recorded in our journals but also be put in this information by customer so we know who owes us money so we could track that so for example if we have accounts receivable on the trial balance that means that people owe us money and if we can want more detail than that we can go to the general ledger the controlling account just as we can do for any other account on the trial balance and it does give us a lot more detail this is the activity that made up that 27 000 that's on the trial balance but all it's doing is it's given this activity by date I can guess what happened this is probably an invoice this is probably we got paid on on the invoice we probably made a sale here we probably made a sale here we got paid for this sale we made up here and so on and so forth but what I don't know very easily from this is who we made the sale to and who still has not yet paid us therefore we need to get to the same data the same 27 000 not by date but by subsidiary ledger which is going to say something like well Smith owes us 5000 Ryan owes us 15 Adams owes us 7 000 that's what gives us the 27 000 and then of course we can go hey Smith and Ryan and Adams could you we would like to be paid at some point in the future if it's not if it's not too much of a problem and go through and go through there and track this so note that this should always match what's on the general ledger and the trial balance now the same is true for the accounts payable the accounts payable is going to tell us who we owe money to we purchase something we owe money somewhere else we will get more detail from that like we would with any account from looking at the general ledger account for accounts receivable but again it doesn't give us the type of detail we need or not the type of the only the type of detail we need in other words it gives us transactions by date we could get information from it this means this looks like we bought something on account we bought something on account count see well went up we paid something off then we bought something else again we bought something else again and then we paid some of it off so that's going to be the trend there but it doesn't tell us who we owe who are we going to write a check to who do we who do we make the payment to for this one thousand six forty to know that we're going to need the subsidiary ledger which would say something like office depot wheel six hundred eighty two anna's food wheel six hundred forty and al's auto wheel three twenty that's what makes up the one thousand six forty that's who we actually have to contact and pay in some format to make the accounts payable go down so remember these special journals are going to be those types of journals were used in more of a manual system rather than posting everything to the general journal and or recording everything to the general journal and then posting to the general ledger each time we have a transaction which could take a lot of time in a manual system we will group information throughout the month by similarities of transactions sum them up at the end of the time period and then make one journal entry for the entire month worth of transactions for each special journal which will save time the typical special journals will be the sales journal the purchases journal the cash receipts journal and the cash payments journal of course the names give an indication of how we're going to group this information but they're a bit deceiving the sales journal only means sales on account if we make sales on for cash even though we made a sale it's going to go in the cash receipts journal the purchases journal is going to be for purchases we made on account if we make purchases for cash it's going to go in the cash payment journal now the cash receipts journal and cash payment journal are what they are if if we receive cash or if we pay cash then it's going to go into the cash receipts or cash payments journal respectively then we have the subsidiary ledgers we've talked about the two subsidiary ledgers a subsidiary ledger would be needed anytime we have some kind of grouping of information that's over and above what is given by the controlling account given by the general ledger that being information in order of date of transaction the examples that we have are going to be the accounts receivable account where we need to know information by customer who owes us money and the accounts payable account where we need to know information by vendor those two things being something not shown on the balance sheet or the controlling account the general ledger account


In this presentation, we will discuss the building blocks of DHIS-2. In DHIS-2, there are three core building blocks or dimensions that describe the data. This includes the where, which we refer to as the organization unit, the what, which we call the data element, and the when, which is known as the period. Every data value within DHIS-2 will have, at minimum, these three dimensions associated with it. Let's take a look at the example below. If we have a value of 100, this value on its own does not give us enough context. By attaching the where, what, and when dimensions to this data value, we have a better idea of what it represents. We first start with the organization unit. This is where that value is collected from. We then have the data element, A and C, first visit. This is what is being measured by that particular data value. We then have our period, October 2014. This is when that value was reported. We can see when we add these three dimensions to that data value, it now has some meaning and we understand what that value represents. Let's discuss these three dimensions a little bit more. In DHIS-2, organization units represent the geographical context. As an example, this can be the facility reward that is providing services in a health system, or it can be administrative units like a district or province. Typically, data is collected at the lowest level organization units that are available. In a health system, this might be the health facilities. Reports can then be aggregated for any level above this lowest level. As an example, if we want to add up data from multiple facilities, DHIS-2 will be able to perform these calculations for you. Organization units are located inside of a hierarchy. The organization unit hierarchy is meant to reflect the administrative structure and levels within the system that you are working with. How we build this organization unit structure greatly affects usability and performance within DHIS-2, and we will come back to this concept in other sessions. In training land, which is the training environment that we have created for you to use, there is a four-tiered hierarchy system. You may have noticed this when we were running through the very quick demonstration of some of DHIS-2's features. We start at the top with the country. This country is separated into two regions. We saw this when we went over the presentation of training land. Each of these regions have districts that belong to them. Underneath the districts we have facilities. All of these facilities belong to a particular district. Different systems have different types of hierarchies, but we will be using this example to demonstrate different principles within DHIS-2. The next aspect that we will explain a bit are the data elements. Data elements explain what we collect and analyze. As an example, we can collect information on the number of new malaria cases, the total population, the number of measles doses given, and in our first example we used ANC first visit. Sometimes data elements are referred to as indicators in other contexts. However, in DHIS, data elements and indicators are not the same. Data elements describe the raw data. This is what we are collecting on our forms. Indicators can refer to calculated data values. We will go over the principle of indicators through our analysis sessions. But just for now, we're focusing on data elements which collects this raw data. These data elements can be further disaggregated. For example, you can separate measles doses into less than one year and greater than one year. We will also cover this concept during the analysis sessions. The last core dimension that we will discuss are the periods. This is the when aspect of our data dimensions. Periods are organized by types and frequencies. This can include monthly, quarterly, six-monthly, yearly, and other period types. If we have data that is collected monthly, then we can create reports that are monthly, or we can aggregate these reports to be anything above that period. So that monthly data can be automatically aggregated to show data by monthly, quarterly, six-monthly, yearly, and any other period that is above that monthly period. We can also use this concept of relative periods. These allow us to reuse different reporting outputs without having to update them. Some examples of relative periods include last month, last quarter, this year, and there are many other examples that we will cover in the demonstrations. Relative periods always refer to the current date. As an example, if it is January 2017, the last month will be December 2016. In February 2017, this will automatically update, and the last month will now be January 2017. We will cover this concept in quite a bit of detail through our analysis sessions. So to summarize what we have discussed in this presentation, we have three core data dimensions for building blocks within DHIS-2. This includes the what, which we refer to as data elements in DHIS-2, the where, which are called organization units, and the when, which refers to our periods. We can go through one more example of this now. If we look at live bursts, this is the data element that we are collecting. This is collected within Cake Hospital. That is where we are collecting the data from. This is collected in February 2016. This is when this data item was reported. At minimum, these three aspects are attached to all of the data values within DHIS-2. This ends the second module. In the next module, we will be covering various aspects of data analysis. We will refer to these core concepts many times within those sessions. Please let us know if you require clarification on any of these concepts before proceeding.