I think many students are in this same boat. So yeah, walking through those instructions, right? So the very first thing it's doing is saving RBP onto the stack, whatever the base pointer is. So you have to assume, right? We just got here, we don't know how we got here exactly. First thing we do, save whoever called us base pointer. The next thing we do is move the stack pointer into the base pointer, right? So move RSP into RBP means that the stack pointer is, sorry, the base pointer is now at the same place as the stack. And again, we don't know what it is. So you can just assume it's zero or a hundred or a thousand however you want to think about it, right? Yeah. Then what's the next line do that we just talked about? So, and that's making room for four. For how many bytes? Or 64, but... Yes, 40 hex, right? Yeah, yeah. It subtracts 40 from the stack pointer. So now it's adding, it's making room for 40 bytes. 40 hex, but 64 bytes on the stack, exactly. Okay, and then, so this like just directly moves the, this like hex number into that, like register, right? Yep, all right. So there's, sorry, there's a, you can think of it as there's the A register, B register, C register, D register and a couple others, right? And so R, so the way to think about it is this architecture has evolved over time. So it was originally, I think, eight bit or 16 bit registers. And that was like the A style. And then when they extended it to 32 bit, then they became EX, E-A-X. So if you see any E-A-X like line, you see plus a hundred there, the move E-A-X. Yeah, okay. It's a little bit lower, it's like four down. Anyways, E-A-X refers to the 32 bits of the R-A-X register. Yeah, there you go. And then R-A-X refers to all 64 bits of the same register. So they're all different ways of talking about the same thing. So cool. So then with that, we can keep going. So yeah, that's a move that whole hex value into the R-A-X register so that after this instruction executes, you know absolutely the value inside R-A-X is exactly that value. Okay, in hex. Yes. Okay. And so then the Q word, that's like a looked up, it's like it says quad words. Wait, wait, let's go to the next one right after it. I like doing it step by step. The D, R-D-X stuff. Does it do the same thing just like that hex value? Yep, so now it's moving a different hex value into there. I think we're on plus 32. I think it's three lines up where we are. Or four lines up. Oh yeah, sorry, totally looking at the wrong one. No worries, I mean, you can tell it's the same pattern, right? So once we kind of get these lines, we'll get the next ones and then they just build on each other. Yep, okay, so then it moves that one into that one too. Perfect. And then this one, so is it like making room or like putting in those like different, like hex values into different spots? First thing we have to ask ourselves, what is the, what's the source and what's the destination in this instruction? Wherever that base pointer at this thing is the destination, right? Yes, and then what does the brackets mean around there? Does it just like, like, does it before, like that creates it? Not exactly, it's like a, the brackets basically indicate like in C a pointer dereference. So what this instruction is doing, right? So you already said it, the source is RAX. So, and it's a move instruction, right? That's obviously the very important thing we didn't mention. It's a move instruction and it's saying move whatever's inside RAX and the question you have to ask yourself, do we know exactly what's in RAX at this point? Yes, exactly because we have that from two lines above, right? Yeah. And then where are we moving it? So a move instruction could be like, if you look down at plus 80, you can see that move RDI comma RAX. Yeah. That's a move instruction that says move whatever's inside RAX into the register RDX. So it's just a move instruction between two registers in the CPU. So that's different, obviously, and it looks very different than the other thing, right? And the key difference is, so A, the quad word, the key word tells us that it's 64 bytes. Yeah. So it's saying take 64 bytes from RAX and the question is where am I moving them to? So I'm moving them into memory, not into a register and that's what the brackets tell you. The brackets tell you dereference. And so what it does is says, okay, first calculate whatever's inside the brackets, right? So what's that value in the brackets? Take RBP, the base pointer, which we actually know because of, we don't know the exact value of RBP but we know from line plus eight that it is pointing to 64 bytes above the stack pointer. So it says take RBP, subtract 40 bytes from it and then copy the 64 bits into that location and it's gonna copy basically up. Okay, so does that put it like, does it begin now where the stack pointer is? Like, does it? So it happens, it doesn't necessarily but it does here because we know RBP minus. So actually the thing that I always do when I do this is draw diagrams. Is there any way I could draw on your screen? Actually don't, because I don't know Zoom that well. I think you can. I think if you grab remote control maybe. Oh, how about this? I'll share a whiteboard. Can you all see this whiteboard? Can you see both? I can't. So I don't know. No, you can't see it. Okay, I can't see it. Are you able to annotate on the screen by going to view options? I can try. It says request. It's like request remote control maybe. It feels. Oh yeah. Okay, oh wow, this is weird. Okay, but I don't actually wanna do this. I want to annotate because this is terrible. Okay, but at least I can. Okay, wow, this is actually really fancy and scary all in one. Okay, I'm gonna stop doing this because this scares me a little bit. No, I just don't want to have that much power over a student's screen ever. Okay, let me see if there's. People used to always do this, right? Okay, let me do it brief. I may not be enabled, but I think that's probably it. It's probably disabled by default in this Zoom meeting because of ASU security things is probably my guess. I'm sure you'll recall the fun Zoom bombings and stuff. Okay, so what we should do is, okay, let me go run and grab my iPad. Can you copy and paste that snippet into the chat so I can take it and I'll start sharing from my side and I'll start drawing and stuff. Like from in here? Yeah, yeah, yeah. At least the first, I don't know, like eight or 10 instructions, like not everything, but some of it. Thank you, Barbara did that. Oh, cool. All right, thanks. All right, so I will. Sorry, I wasn't prepared for sharing my own screen. All right, here we go, share screen. Hey, oh my gosh, that actually worked. Okay, everyone can see this? Yeah, yes.  So, okay, so we have, so we can ignore this NBR64. It's like a weird, if you Google this, you can find out it's a weird thing, but it's basically a no op, right? So that basically doesn't do anything. We talked about PushRBP, and what we can do is I'm going to draw the stack layout as we see it. So, and we don't know the exact addresses, right? But we can just use zero as our thing. So we can, when we start this program, we can say, okay, right at zero. And the way to remember that all these things work is, I'm drawing this pointer that RSP is pointing to zero when we first call this function. But honestly, I don't actually know that. And I don't even care because, because what matters is whatever's inside the register RSP, that is where the stack pointer points to. So, okay. So then we look at this first line PushRBP. So whatever was RBP is gonna be on the stack. And now, and how big is a register? How many bytes? Say it louder. Or? Not quite. It's 32 bits. Is it 16? Eight? Eight, yes. Eight, there we go. Yeah, so remember 32 bit means four byte register size and 64 bit means eight byte register sizes. So in our example, we know that when we push something onto the stack, we know the stack pointer is now actually gonna be pointing to eight. And that's RSP. So it's gonna be moved down eight bytes to make room for what we just pushed onto the stack. So we just did this PushRBP. And now our instruction pointer is here. And it says, okay, the next thing I'm gonna do is move the stack pointer into the base pointer. So I'll draw another arrow here to say, okay, RBP is here. So RBP currently has the value eight in it. And I just executed that. That's great. I go to the next one. I say, okay, subtract hex 40 from RSP. So now RSP is gonna be, oh, it already moved away from here. It's now gonna move here. Oh, and here you can see I immediately got a problem because I started at zero, right? Which is probably a good idea not to start at zero. But like I said, we could start basically anywhere. Let's say a thousand. So this is, what's a thousand minus eight? This is the problem I need to like. This like weird math I don't normally do. Calculator, 992, thank you. And then what's 992 minus 64? 928. 928, thank you. And again, the difference is the one that matters. It doesn't really matter what it is that can help us kind of think about it. Yeah, thank you. Okay, cool. So we did this instruction. And this is honestly, you know, this is exactly like you, a good practice for these assignments are to do exactly what we're doing now and just step through it line by line. And, you know, because it's just registers or values moving around. It's of course understanding the semantics here. Okay, so we talked about this. So this is gonna move this value into the RAX register. I can put, you know, RAX here. And I have that value. I don't know what it is right now. I'm not gonna just write it there. But that's what that line does. We know we go here and that's move that value RX414E into RDX. So RDX is gonna be 0X43, sorry, it's at 41. And then we get to here. So now we get to where we're going. Okay, so we're back Eva. What are we doing now? So what are the semantics of this instruction? Oh, I think you had mentioned. So is it, it's filling from those like 64 bits back and up with the value in RAX? Exactly. So and that's, and it's at RVP. Oh, I'll get some feedback. Okay, there we go. Thanks. Okay, so it's starting at RVP minus, and this is what we can see here. It's at RVP minus hex 40. We actually already know that RVP is at 992. Minus 40 is 928. So we're starting here and we're writing onto the stack the hex values of, and we know we're writing eight bytes total. So be honest, I'd have to like debug this to remember exactly the order. It should be moving that onto the stack. It should be, so it's 54. So we can just kind of put here 0X54, blah, from here, right? So we can make a note to ourselves that that comes from there. And so we know, so how many bytes did we copy? 64 bits, 64 bytes is a lot. We copied at the address starting down 64, but we moved whatever's in EAX. EAX is eight bytes. So we've now copied eight bytes onto the stack. So this is at, oh gosh, what is it? 936, is that right? Yeah. 928 plus eight. I actually really hate doing math like this, so, okay. Cool. And then now what's the next line? So it does the same thing. And what is it moving where? So the thing, yeah, the question you always got to ask yourself is, okay, what's happening here? What are the semantics of this line? So we are here. RDX is moving to the base pointer minus the 38. Exactly. And is that gonna be two bytes above this one? What's the difference between these two? Is it 16? Probably eight, but I actually don't know. So can somebody translate these? The important point is to remember that it's hex, right? And that it's not just two bytes. So we would calculate, what is RBP minus hex 38? We would find out that it should be 936. So we know this is RBP minus 0x38, right? And what am I gonna put there? I'm gonna put this value, whatever's here, right? So this is 0x41 for E dot, dot, dot, dot, dot. And then how many bytes here get copied? Another eight. Another eight, exactly. So this is, we know at, what's that? Got another. 942. 942, I'm gonna take your word for it. 34, 44, I line. All right, it's okay. We'll forgive you. All right, at 944 is nothing, right? So we filled in now 16 bytes from the stack pointer minus 40, or sorry, from the base pointer minus 40. And then, so now we've done this line. Now we go here. So what's here? So it's just like overwriting or like reassigning what value is in RAX for that new week. Exactly. So it's moving a new value into RAX, which is gonna exactly replace everything that's in here which what's in here. So let's start with 49, 0x49, dot, dot, dot. And then it'll do the same thing with the RDX. And what's the one difference between those two lines besides the register? Yes, the size of what we're copying in. So this means that remember what this will mean is the most significant byte is zero, right? Because it's like the difference between 10,000 versus 100, right? It's like 0x10000 versus 0x, and this is hex, but whatever the point still stands, right? The difference between there is there's two, there's zeros at the start of this number. And if we think about this number, because we know these are eight bytes, right? This only has seven bytes. So the last seven bytes will be written there. What would it really be like 0, 0, 5, 9? Yeah, so like if you did move, so if you did RAX, 0x, 40, let's say, right? What this says is the actual bytes you want in RAX is 40, hex 40, which means the least significant byte is hex 40, and all the rest are all zeros, right? That makes sense, because that's what you want here. So exactly the same thing is happening here. So after this instruction, so we go to execute this instruction, 5954, so here in RDX, I'm gonna put 0, 0, 5954. Sorry, yeah, so the important thing is the 0, 0 at the start there. All right, cool, and then what's the next line? Now again, it's moving the RAX value to 30 down from 0x. Perfect, yes, RBP minus 30, which we actually know is eight different than here, so that should be right here. So this will have 0x, 49, dot, dot, dot, dot, dot. And right here will be this plus eight, which is what, 952. It's super weird for me that I didn't do this in hex on the side, but it's kind of a little slightly easier, but anyway. Okay, then we can go here. We move here RDX where? Another eight up, so basically on top of three. Yep, so it'll be right at 952 exactly. We'll copy this value onto there. It'll be 0x, 0, 0, 59, 54, dot, dot, dot, dot, dot. And then this is eight bytes ahead, so this is lines at 960. And then what about this next line?  Yeah, exactly, so eight zeros, right?  So 0x, 0, 0, 0, 0, 0, wiping out whatever was there. And eight bytes of that is 968. There's a question chat. Does that mean the first two insertions overlap? Which two insertions? The one that enters into minus hex 40 and then minus hex 38, since they're not. These are eight bytes apart. They are, because it's hex. That's the important thing to remember. Oh, so the other ones are even farther apart then, because eight hex values. No, no, no, so it's... Oh, I'm sorry, I'm sorry. Okay, yeah, I was looking at it incorrectly, yeah. Yeah, no worries. It's the trick, it's like I can't do addition and subtraction just on hex values because you'll get messed up with the E's and F's. So that's the crazy thing. You don't see any of the A, B, C, D, E and F values, right? So if you just try to do base 10 math on it, you will get messed up. So I always either take them, translate them to 32-bit or just use the programmer mode of the calculator to change them and operate on the hex values directly. Cool, look at that, we're making progress. All right, now what about this line? I didn't look up with that many yet. I had already gotten so lost before that. So this is as far as I've gotten. So I'm not totally sure. Is it like really putting it back? Like is it moving? Yeah, it looks very, it looks very similar to a move instruction, right? And if this was a move instruction, so this is the way that I think of, right? If this was a move instruction, exactly what this would mean is, where is RBP minus 40? So take RBP, subtract hex 40. We actually know that it's the value, this is RBP minus 40, or minus hex 40, I should, which is a 928. Take whatever's, and the brackets here on a move mean take that exact value there and copy it into RAX. So after this, RAX would have 54, dot, dot, dot, whatever it's in there is copied to here. That's if it's a move. And so the difference is load effective address, LEA stands for load effective address, which basically means if we were moving this, what would be the address that we're moving? So in essence, all it's doing is put in RAX, what is RBP minus hex 40? Does that make sense? So I, normally brackets mean dereference, like take, either put something in memory or take something from memory, but here we're not doing any dereferencing with the load effective address. It's really just, what is RBP minus hex 40 and copy it into RAX? Yeah, so it's the difference of normally, these are equivalent to like a dereference operation, whereas in LEA it's equivalent to like the address of operation, like the ampersand. So is RAX that value of like 928? Exactly, yes. So when this instruction executes, the value inside RAX will be 928. And now what's this? So that's just loading the value in RAX into RDI. Yeah, exactly. So it's copying it, right? So about to make another register to keep track, RDI now has the value 928. And what about then the next line? That's a good question. I'm not sure I was confused about the different functions too. Yeah, so I think it said it at the, did it say it in this one? Yeah, it said it at the bottom. That, yeah, it should say something like, wait, I have one open too. Yeah, so it says the function string length and puts are from the standard G libc library. So what's the output of the assembly? So this is saying that we're gonna call the function string length. This is what this is saying. The other complications are basically just artifacts of how in binaries you call functions. But basically at this point, we are at the point where we know we're gonna call a function. And so now we need to look at the x8664 calling convention. Because we need to understand how do we get to, how do we pass values into the function? So you know, I'm sure you used the string length function before perhaps in your C code. Yeah. Yeah, so what does it do, General? Like, what's the basic purpose? Say it again. How many characters like pieces? Exactly, yeah, how many characters in, so let's actually go look at that real quick.  Cool, so you can't see my screen, right? It's just like where you left it on there. Okay, cool, cool, cool. Okay, I'm just bringing up the documentation that we can look at and we're back. Yeah. Sweet. Okay, so yeah, so now what we're doing is we're calling this string length function. So just like you said, right? So the semantics of string length, and if you didn't know, you would read this. So the string length function calculates the length of the string pointed to by S excluding the terminating null byte. So it's how many characters until we get to a null byte? It uses, so it's passed in a character pointer, the first and only argument, and it returns a size T. So the question is, this is what the function call would look like in, and if we look down, we don't have an example, but we understand how to call this in C. The question is, how does this get compiled into the assembly program? And that happens here. So inside here, so the important thing is the system five AMD64 ABI. So I posted a link in Discord a while back, but I can make another one, but this is the calling convention of how you call functions at the binary level. And so we can read the calling convention of the system five ABI is followed on Solaris, Linux, FreeBSD, Mac OS, and is the de facto standard among Unix and Unix like operating system. The open VMS calling standard on X8664 is based on the system five ABI with some extensions needed for backwards compatibility, blah, blah, blah. Important things for us. The first six integer or pointer arguments, so how many arguments do we have? One, there was only one in there. There's one exactly, and what type was it? Was it an integer or a pointer? Exactly, yeah, it's a pointer, right? It's a character point, a character star is a pointer. Exactly, perfect. So the first six integer or pointer arguments are passed in the registers RDI, RSI, RDX, RCX, R8, R9, and R10, which is fantastic, right? So what did, and if we go back to our code, what's the value in RDI when we call string length? Oh, it's the 928. Which is a pointer to where? That, the spot, yeah, where your thing is. Exactly, yeah, where the cursor is, right? So right there, it has many different names. We know in our example, it's the memory address 928, but it's pointing to the start of all of those bytes we copied onto the stack. Now the other thing we need to look at in this calling convention is where do we get the return value? So we set up all of those, blah, blah, blah, while these values are the first floating point arguments, I don't think we'll have floats. So that's not really, you know. And then after that, as in the x86, Microsoft, x86, additional arguments are passed on the stack, integer return values. So this is important, integer return values up to 64 bits in size are stored in RAX. So this means that after we call this function and it returns, we should be able to get the result of calling that function in the RAX register. So going back. So this function executes. Now the question, now what's the next thing that happens? It's in the EAX, it moves up, I guess, more. And puts up the, it's in the EAX value. Yeah, where does it put the EX value? However many C is. Yeah, I think it's 12, is that right? Yeah, cool. So this is RBP minus 12. So this'll actually be somewhere up here. I think it'll be roughly, oops. Can somebody calculate what that value actually is? 988, thank you. So clearly we have a not-for-scale diagram here. Now the question is what is in, so remember this is the other thing I was talking about. So we can think of our register RAX here. Each of these is one byte. So we have four bytes. So the whole thing in total is called RAX. The, this part here, just these two bytes is called EAX. So they're exact same thing. Yeah, so that, so the EAX is the lower 32 bits of RAX. So it's saying, okay, take that and move it to RBP minus 0X. Now the question is what is the string length of our string? So I think this, sorry, what? Yeah, I'm not sure. Yeah, so I think that's the important thing. So we know, and remember we have to go back and look at these. So we know that this is eight bytes. We know that this is eight bytes. And we know that string length will start at the very first byte here and keep reading until it gets a null byte. So it doesn't, then this is kind of the really cool thing about the computer doesn't know or care that, hey, this is at this thing and these registers are here. It says, give me a memory address for string length and I'll keep telling you how many bytes I have to go until reaching. So we know actually that this stack, the current stack we have down is a negative direction and up is a positive direction. So we know we're gonna start at RSP at 928 and we're gonna keep reading byte after byte until we get to that null byte. So it should be, and this is, thank you, in chat. So we know how many bytes are here? Eight, yep, eight from the very first RAX. And we can look, are there any null bytes in here? What do I mean by null bytes specifically? Yeah, zero X, zero, zero, awesome. So no in there. So we'll keep going and we'll keep going up here. How many bytes here? That's another eight. Should be another eight and then here? Another eight. Another eight and then here? Another eight. Is it eight? What was this one? This one was this one. How many non-null bytes are there here? I can't hear you. Yeah, seven, thank you. Now, this actually could be a question mark. I'd have to run a quick test because the question is, where is this null byte located? Is it at the most significant bit, the farthest away or the least significant byte? So remember, if we go back to 230 and you learned about ending this, we have to always be thinking about that. So for instance, if I have, oh, this is a wrong diagram because there's not enough places. Oops, I just realized this. This should be bang, bang, bang, bang. Okay, but if we think about 32 bits because that's easier if we go zero, zero, zero, one, one, two, two, three, three. So it's a 32 bit number, four bytes. Now the question is, how does the computer actually store that? Does it store that as zero, x, zero, zero, zero, x, one, one, zero, x, 22, or zero, x, 33, or is it zero, x, 33, zero, x, 22, zero, x, 11, zero, x, zero, zero. So how do we figure this out? Google, yes, definitely Google help. It is little Indian, right? So we could look up, yeah, we could look up x86, 64, Indianness. Can somebody double check? I know Nick just, or Nicholas just put in the chat. I believe it's little Indian, but then I can't remember which one of these actually is little Indian. So this is little Indian, which would mean that, so if this was memory address, this would be at zero, one, two, three, is that right? Yeah. Oh, you said the first one. Sorry, not the second one. So, see, we're all confused. Okay, the way to settle this is to, let me, good, good, good. Okay, it's just a double check. This is what I like to do. Test.s, we could write a quick assembly program to test this. We could say move, what was the, so we had, I had some example, right? So our, into RAX, let's say a zero x, zero, zero, one, one, two, two, three, three, four, four, six, seven, eight, right? So we're just putting some value that we can see right here into the thing, into RAX, move into RSP, RAX, same good ish. So everyone understand what I'm trying to do here? Yeah. Yeah, so move this value into RAX, just move it onto the stack so we can then look at the stack and see what this looks like. Cool, all right, GCC. All right, cool. And I need some way to, can somebody, or I can Google. So the problem is I'm using not, so the standard x86, sorry, the standard GCC syntax I believe is AT&T and this uses Intel syntax. So GCC, I should be able to adjust, yeah, there we go. There's a command to dash MASM equals Intel, no, and dash capital S maybe, that doesn't help. Too many memory references for move. Oh, I think I'm missing the Q word stuff, okay. Was it, and it was pointer like that? I don't usually write, maybe it's, I'm just gonna switch the syntax because this is way easier. It's exactly the same stuff that we've been looking at, but just the different syntax. So no instructional operand type abs maybe is the problem. Yeah, that's what it used in the... Okay, I'm just Googling how to do that. Bum, bum, bum, bum, in sum with guess move as Q. Okay, cool, so that's Q. I was missing the Q here and I believe this means a constant value. Why is it still saying Googling is your friend? Oh, because I messed everything up, ha, that's funny. Okay, my syntax was wrong. These should be percent signs, there we go. So registers are percent signs in AT&T syntax and constants are dollar signs. Defined reference to main, oh, GCC. Okay, I must be missing something. Am I missing text? Oh, there's a way to export main, export main. Honestly, I probably just could have screened GCC. There we go, okay, dot global, cool. So this is saying, hey, this dot text means this is code, dot global means export main so that it can be picked up by everything else. There we go. And of course this actually doesn't do anything so we'll do it in GDB, breakpoint on main, start. And look, there's our instructions. All that work, we did it, we did it everyone. So move this into RAX, move RAX into RSP, return. Okay, so I'll walk through this and I'll show you a P slash, there's a couple of things you can do. Info registers will tell you the value of all the registers. So you can see RAX has this value. This is exactly what we were doing by hand on the handwritten thing, right? So if I do a step instruction, it will execute and your GDB will look different when you do this at home, I'm using an extension to GDB called GEF that shows you this debugging output. But the commands I'm typing in are things that you can, you can, so X, five I dollar sign, RIP. This will show you the current instructions where the instruction pointer is pointing. So we know I just did move that custom value we had into RAX and if I do info registers, that should show me that the value inside RAX is this value. Awesome. I can also do print slash X dollar sign RAX. So this means print out and then the slash X means hex, the value inside the RAX register. So that's what this is telling me. And if I go back to this, this is examine slash five as instructions, the RIP instruction pointer. So the next instruction is going to move RAX onto wherever the stack pointer is pointing. I step instructions and now I run info registers. Oh, info registers isn't going to show it to me, right? Because I've moved it where the stack pointer is pointing. So I can do X, 30 X dollar sign RSP. G is for giant values. Okay. So we can see here RSP has the value inside of it of seven FFFDE 88. And the hex value there is that value we put there. So yes, this actually worked exactly how we thought. That is fantastic. Now to answer the question of what is the actual value there, I have to go back to the RIP instruction pointer. To figure out GDB print variable examine. It's printing out the whole value here, but what I want is, so I'm looking for is what that actual value is right there. So GDB, there we go, bytes slash B. Okay. So this number is increasing. So at 88, it's 0x7 at 89, it's 66, at 88, 89, 88, 89, 80A, sorry, my hex is bad, 80A, 80B, 80C, 80D. So, and what was our original number? Well, we actually have it right here, right? We have 0011. So at that memory location, the, so it is little Indian. So going back, who mentioned that? It was Gianni. Yeah, good job. So we know this will go at the smallest memory location here. Right? So it is laid out exactly this way. And this means that for this one specifically, the string length here should be 88 and eight. Oh, because it would stop at that first. At that null, at that null byte, yeah, which would be on the smallest one, right? So it's the most significant, it's stored at the lowest and lower values are here. So as it's going up, it will get there, yeah, exactly. And that will also help you how to write out and understand exactly how these characters are laid out. So then in the EX value, so if the string length is what, 24? And that's, is only half of that. So 24 is less than, so 32 bits can hold up to two to the 32, which is like two billion or something. So yeah, it's just gonna be 24. It will move that into RBP minus there. So it should be, which we said was here. And so that should be 24. But you may have to double-check this. I'm doing this all off the top of my head, so. And then yeah, this next one, right? Move zero into RBP minus eight, which will be here, which we didn't diagram, there'll be a zero there. And then it will keep going from there. When it does this Caesar plus whatever, that's like the line number. Right, if we jump ahead too. Exactly, so it's jumping to this one to one B, which would be one of these addresses. And yeah, it'll tell you Caesar plus, so this is the, like this is Caesar plus zero plus four, plus five, plus eight, plus 12. Yeah, wow, okay. Yep, just gotta step through, step by step. So I guess like maybe just like some of the other like key words, like when it's just like bite pointer versus the like key word, or key word, like what's the difference between? Can you show me the example? Like later on in the second half, like what is that super different, or is that just like? Ah, so yeah, that means that's, so that's what it's saying about the size. Um, it means that it's only moving one bite. So rather than the other move we saw with the D word or key word, key word was moving all eight bites. This is only moving one. And AL is the least significant bite in the A register. So this would move whatever's in AL into RBP minus one. What, so where does that AL come from? It's from the RAX. Exactly, RAX, and so AL, RAX, EAX are all the same registers. Let me find something real quick. Oh, this is actually a nice diagram. I don't know if this translates well into the chat, but nope, it does not. I had a really good diagram somewhere. If you make a Piazza post asking about it, I will pull up that diagram and I can share it with you. Last part is then so for the output. Oh, sorry, sorry, just a second here. This is actually a decent one here in this. This is the, an X86 assembly, X86 architecture. So it's like showing a little bit. It's not as graphical as I would like, but that, or does it look nice? Yeah. Yeah, so it shows that like AL is the last bite of the RAX register and AH is the second to last bite of the RAX register. Yeah, that makes sense. Cool. Any other small questions? I have to run. I'm late for a meeting, but I was late here, so. Yeah, I had a small question. So I'm doing the stack roll with low things like part one. And I was, I did everything and then I go all the way up to the end where I'm like, okay, I'm gonna make my code to make a certain amount of bytes and then with the wing condition at the end. And then, yeah. But when I run my program, it doesn't let me create a file. Like it says I permission denied when I try to like create a file and the rest of it. So is there a way to get around with that or like, should I put it in a different place? Right now I'm just gonna put it in temp. Yeah. I don't know enough about that specific challenge to tell you exactly. I think, yeah, I would, I would look at the, what's the word I'm looking for? Sorry. Yeah, if you have the binary, look at what file it's trying to open and create that file or that directory. Oh, okay. Thank you. Yeah, it's probably that it doesn't exist is why it's saying that that file not found. The other way you could do this is if you run, so let me show you something real quick. A super nice thing to help with debugging is, and it's a lot of output. So don't be too overwhelmed with what you see, but you'll definitely see it in there. Is, did I just share my whole screen? That's not what I wanted. Can you all see my iPad? Oh, there we go. It's popping up. Okay, okay. Can you see this? Yes. Okay, cool. So you can, there's a program called Strace that will run a program and show you all of the system calls into the operating system that it's making. So for instance, like with this program, so I'm just running LS, and it of course is, but it's telling me everything that it's calling. So for your case, it should call an open call at some point. And like here it's telling me exactly what it's outputting. Like it's outputting this test.txt, all the things that's outputting, it does the same with file operation. So it would actually tell you what file it's looking for, and then you can create that. You know what? You're totally right, because I'm looking at my code now and I thought I was doing something to create a file, but I was doing something to open it. So yeah, it's probably the way I had it. Yeah, it doesn't exist, so I have to create it first. Awesome. Yeah. Cool, okay. Other question was, is every homework with the same overall weight? Yes, every homework assignment is weighted the same. Professor, I had another question about assembly zero. It's the thing I messaged you about over Discord where I think I'm putting in the correct answer and it's always saying it's incorrect. And I ask the TAs about it and they don't even know why it's saying my ECX is incorrect, but my EAX is always correct. Okay, make a Piazza post please, because a private one, and put what you're putting in so that we can double check it on our ends. That way it'll go to all the TAs and all the professors. A private Piazza, you said? Yeah, yeah, just set your post to private and we'll find it. Okay. Cool. All right, thanks everyone. Sorry, I was late. We went a little bit over and I'll share this online. Bye.


I think this is our sixth installment in the Olivet Discourse, Matthew 24. I don't feel too terribly bad about that. They would be equivalent to probably two normal Sunday morning sermons, so the sixth is okay. We'll keep moving through the text. But we're working our way through the Olivet Discourse from Matthew 24. And tonight we come to this little section I want to cover, verses 29 to 35. We've got a few sections left to work through in this text. Before Pastor Rick will take over and work through first and second Thessalonians with us, some key texts there. So we're going to soon wrap up Matthew chapter 24. As we consider this text, I know specifically with eschatology as we're studying the book of Daniel in small groups, studying our future hope on Sunday mornings. As we progress through this period over the next several months as we study eschatology together, these things will begin to congeal, begin to harmonize. Many of the moving parts that are sometimes difficult to keep up with or difficult to understand will begin to come together. And so tonight we'll begin to take a look at a few of those, maybe a few texts from the Old Testament, a couple of texts from the New Testament to help us with respect to this text in Matthew 24 verses 29 to 31. And we'll begin to do that as we work through Daniel also during small groups. I know on Tuesday and Wednesday nights we're getting close to Daniel this week, Daniel chapter 7, so we'll begin to see that take shape as we study Daniel together as well. So Matthew chapter 24, I want to read the text and then we'll get into a sermon this evening. Matthew chapter 24, beginning at verse 29. Immediately after the tribulation of those days, the sun will be darkened, the moon will not give its light, the stars will fall from heaven, and the powers of the heavens will be shaken. Then the sign of the Son of Man will appear in heaven, and all the tribes of the earth will mourn, and they will see the Son of Man coming on the clouds of heaven with power and great glory. And he will send his angels with a great sound of a trumpet, and they will gather together his elect from the four winds from one end of heaven to the other. Let's pray. Father Heaven, as we often do, we just come to you and acknowledge our weakness, acknowledge our dependence upon you, acknowledge our need of understanding, and acknowledge your infinite wisdom and the great help of your spirit to guide us, Lord, as we seek to understand your word. Help us tonight, Lord. And again, these things I know are highly debatable and highly thought through and talked about and discussed and want to be faithful to your word. And yet we understand, Lord, that in many things, in many ways, some of these things are difficult to understand. So we pray for your guidance, pray for your help, and pray, Lord, that you would just be, as you are, gracious and merciful to us as we study your word, seeking to know the truth that you've revealed here for us. We love you. We thank you for this time together, certainly this time together tonight, but also, Lord, just the study that we're involved in at this time in our church, where as a church body, we are studying end times of scatology and looking at those things that you have said about what will come. So we look forward to that glorious appearing of our great God and Savior, Lord Jesus Christ, come quickly, Lord Jesus. We love you in Jesus' name. Amen. All right. Matthew 24, verses 29 to 31. In this section of text, these few verses here, in the Lord's own words, we have described in the text the event that has been the hope and anticipation of believers of every age throughout church history. It is the second coming of the Lord Jesus Christ. It's been a subject of many who have prayed with the Apostle John over the years in the face of this wicked and perverse generation. Even so, come, Lord Jesus. We pray that frequently. I know I do. And it is in the consideration of our forward looking hope, striving to live holy lives that believers share mutual sense of eminency about the Lord's return, a mutual sense of excitement about the Lord's return. I know it's talked about around here fairly regularly. So much so that Paul said to Titus in Titus chapter 2, verse 11, that the grace of God that brings salvation has appeared to all men, teaching us that denying ungodliness and worldly lusts, we should live soberly, righteously, and godly in the present age, all the while, verse 13, looking for the blessed hope and glorious appearing of our great God and Savior, Jesus Christ, who gave himself for us that he might redeem us from every lawless deed and purify for himself his own special people zealous for good works. To this point, there have certainly been those who have come in his name. Many of them saying, look, he's in the desert, or look. He's in the inner rooms, you know, come and see. There's many who have said, look, he's building a compound in Waco. Or look, he's mixing the Kool-Aid in Jonestown, right? With all these people that have said these things, we know there would be fakes and frauds and counterfeits. There's still many who make fools of themselves today picking dates. And when those dates aren't right, they pick dates again. And when those dates aren't right, they pick dates again, always trying to come up then with the next, you know, understanding or the next explanation for why their dates were wrong. And beginning here, though, in Matthew chapter 24, 29, the Lord gives us some of the clearest instruction that we have in the Bible with respect to the Lord's return. And it all begins with chapter 24 in verse 29. Immediately, the Lord says, after the tribulation of those days. Now in the context, it's apparent that the tribulation of those days refers to that great tribulation described by the Lord in verses 15 through 28. If you remember our sermons on that text for the last couple of weeks. Immediately, after the tribulation of those days, that tribulation described in verses 15 to 28, immediately is the Greek word euthyos, euthyos. It means at once or immediately. So immediately, at once, after the tribulation of those days, this comes to pass beginning in verse 29. This serves then to set up an outline for us then with respect to Matthew 24 on this point. We have, let me give you that outline if you want to jot these verses down, we have the introduction to the Lord's Olivet Discourse. That's the Lord's statement regarding the destruction of the temple and the questions of the disciples. And we see that introduction to the Lord's Olivet Discourse in verses 1 through 3. Then as we've discussed, we have the entire church age from the first coming of the Lord Jesus Christ until His return described in general terms as a time of plipsis or a time of tribulation, that time of tribulation of church age described in verses 4 through 14. Remember that tribulation, so it's plipsis or it's verbal cognate phlebo is something that is described as endured by the saints. It's something that the saints endure. They go through tribulation. We're in a time of tribulation now. And of the approximate 55 occurrences of those words, 47 refer to the tribulation endured by the saints. We're in a time now of tribulation, okay? These beginnings of birth pains, as they are called in chapter 24, verse 8, will increase in frequency and they will increase in severity until there comes a time of great tribulation as described in verses 15 through 28. The text doesn't indicate exactly how long this period will last, with the exception of saying that these days will be cut short for the sake of the elect and we'll take up the subject of the length of that time period more closely in our study of Daniel and small groups. And then this period of great tribulation is followed Euthelos immediately by the coming of the Son of Man in verses 29 to 31. So you have a basic outline of the Olivet discourse, right, the introduction one through three, the entire church age versus 4 to 14, the great tribulation is described in beginning in verses 15 to 28, followed by the coming of the Son of Man in verses 29 to 31. The signs that the Lord gives as indicators of the coming of the Son of Man in this text are cosmic in scope. You look at verse 29, immediately after the tribulation of those days, the sun will be darkened, the moon will not give its light, the stars will fall from heaven, and the powers of the heavens and natural laws, the forces of nature, so to speak, will be shaken. And this is the setting in which the Lord Jesus Christ returns. This is the coming, the second coming of the Lord Jesus Christ in glory and power. Therefore, it's most likely that although these cosmic descriptions or cosmic expressions are often used in scripture symbolically or metaphorically as we'll see, here it's pointing to that day foreshadowed by that language and is therefore most likely a literal display in the heavens of the second coming of the Lord. This is the setting for the appearance of the Lord. Turn with me first to Luke chapter 21. Luke chapter 21, let me give you some examples of what I'm speaking about here. This is the setting for the appearance in great glory and in great power of the Lord Jesus Christ. Luke chapter 21, and look at verse 25. Again, this is Luke's description of this same time period. Verse 25, and there will be signs in the sun, in the moon and in the stars, and on the earth distress of nations with perplexity, the sea and the waves roaring, men's hearts failing them from fear, literally means dying, right? They don't merely faint, they pass away from fright, they die from fright. Men's hearts failing them from fear and the expectation of those things which are coming on the earth for the powers of the heavens will be shaken, then they will see the Son of Man coming into cloud with power and great glory. Now when these things begin to happen, look up, lift up your heads because your redemption draws near. Now some will say that these events, this language is used symbolically in the past. And I wanna show you some examples of that. Turn with me to Isaiah chapter 13. Isaiah chapter 13. We see this language, this cosmic distress, several places in the Old Testament and used as a description for judgment that takes place in the Old Testament, but used there with an eye to the future, so to speak, foreshadowing that great and terrible day of the Lord. And we'll see a couple of passages of scripture that refer specifically to that. So first is in Isaiah chapter 13 and look beginning at verse six. Isaiah chapter 13 verse six. Whale the prophet says, for the day of the Lord is at hand. It will come as destruction from the Almighty, therefore all hands will be limp, every man's heart will melt, and they will be afraid. Pangs and sorrows will take hold of them. They will be in pain as a woman in childbirth. And see the repeated use of this language, right? We see the same language expressed in Matthew chapter 24, the pangs of childbirth. We see the day of the Lord referred to throughout the Old Testament, also in the New Testament, destruction from the Almighty. So we see this repeated use of language. This has a specific time-bound reference associated with this. We'll also see how it foreshadows the coming of the Son of Man as stated by the Lord in Matthew 24, all right? Look at verse eight. They will be afraid. Pangs and sorrows will take hold of them. There will be pains as a woman in childbirth. They will be amazed at one another. Their faces will be like flames. Behold, the day of the Lord comes, cruel with both wrath and fierce anger to lay the land desolate. And he will destroy its sinners from it. For the stars of heaven and their constellations will not give their light. The sun will be darkened and it's going forth and the moon will not cause its light to shine. And so you see a similarity in the language, don't you, between Isaiah 13 and Matthew 24? Although this event is specifically referring to the judgment that was coming up on the Babylonian empire at that time by their enemies, the Medes, and all that was fulfilled in 539 BC, this language here foreshadows this time of the end spoken of by the Lord in Matthew 24, verse 29. We see that. We have a foreshadowing or a double reference, if you will, to a lot of the language that's used here. Look at verse 11. I will punish the world for its evil. Another Babylonian empire having conquered the known world at that time, but here the language begins to expand. And again, there is the idea that there's a future reference in mind here with the coming great and terrible day of the Lord. I will punish the world verse 11 for its evil and the wicked for their iniquity. I will halt the arrogance of the proud who will lay low the haughtiness of the terrible. I will make a mortal more rare than fine gold, a man more than the golden wedge of over. Therefore I will shake the heavens and the earth will move out of her place in the wrath of the Lord of hosts and in the day of his fierce anger, it shall be as the hunted gazelle and as a sheep that no man takes up. Every man will turn to his own people and everyone will flee to his own land. Everyone who is found will be thrust through and everyone who is captured will fall by the sword. Their children also will be dashed to pieces before their eyes. Their houses will be plundered and their wives ravished. And let me ask you, this specifically again is referring to the coming judgment of God on the kingdom of Babylon by the Medes, specifically fulfilled in 539 BC. From our study of Daniel, how was the kingdom of Babylon conquered? Was it conquered with a great war? Described by what we see here? And now we've seen in Daniel, specifically now in Daniel chapter six, Daniel chapter five into Daniel chapter six, how it was conquered without a fight. Conquered without a fight. So what's this language here then referring to? It's referring to a future time. Judgment upon Babylon is a foreshadowing of judgment upon the nations of this world at the coming of the Lord Jesus Christ, right? We have language being foreshadowed here. Look at Isaiah chapter 34. Isaiah chapter 34. In other words, you understand what I'm saying there with that comment, it's that judgment. These words in Isaiah 13 are not descriptive of how Babylon fell in Daniel chapter five. These words are although describing that particular fall of the Babylonian empire specifically, have a future reference and that reference is the great and terrible day coming of the Lord. Look at Isaiah chapter 34 and look at verse one. And again, speaking here of end times destruction, come near you nations to hear and heed you people, let the earth hear and all that is in it, the world and all things that come forth from it for the indignation of the Lord is against all nations and his fury against all their armies. He has utterly destroyed them. He has given them over to the slaughter. Also their slain shall be thrown out. Their stench shall rise from their corpses and the mountains shall be melted with their blood. All the hosts of heaven shall be dissolved and the heavens shall be rolled up like a scroll. We've seen this language before, haven't we? All their hosts shall fall down as the leaf falls from the vine as the fruit falling from a fig tree. For my sword shall be bathed in heaven. Indeed it shall come down on Edom and on the people my curse for judgment. It's interesting that that area of Edom is where Revelation speaks of the battle of Armageddon taking place. Indeed it shall come down on Edom and on my people my curse for my judgment. Verse six, the sword of the Lord is filled with blood.  For the Lord has a sacrifice and bosra and a great slaughter in the land of Edom. The wild oxen shall come down with them, the young bulls with the mighty bulls. Their land shall be soaked with blood and their dust saturated with fatness. For it is the day of the Lord's vengeance, the year of recompense for the cause of Zion. Its streams shall be turned into pitch. It's dust into brimstone. Its land shall become a burning pitch. Look with me at Amos chapter eight. Amos chapter eight. If you wanna jot down these texts and go back and take a look at them, there are several others we're passing over a few. I'm gonna hit some highlights. Amos chapter eight. I wanna take a look specifically at Amos chapter eight with respect to its New Testament reference in Acts chapter two. But first, Amos chapter eight and look beginning at verse nine. Amos chapter eight, verse nine. Where the Lord says in verse nine, it shall come to pass in that day, says the Lord God, that I will make the sun go down at noon and I will darken the earth in broad daylight. I will turn your feasts into morning and all your songs into lamentation. I will bring sackcloth on every waist, baldness on every head. Sorry, Pastor Rick. I will make it like morning for your only sun and its end like a bitter day. Behold the days are coming, says the Lord, that I will send a famine on the land, not a famine of bread nor of thirst for water, but of hearing of the words of the Lord. Remember that section of text, Amos chapter eight and go with me to Acts chapter two. Acts chapter two. Again, one of the ways that we can see how these texts are treated is by looking at how the New Testament authors treat them. And there would be some that would take Acts chapter two and Peter's quotation of this text from Amos chapter eight and say, okay, well, this is fulfilled in the time period surrounding Acts chapter two, right? So look at Peter and Peter's interpretation of this text in Acts chapter two, verse 14. So Peter, standing up with the 11, this is chapter two, verse 14. He raised his voice and said to them, Men of Judea, in all who dwell in Jerusalem, let this be known to you and heed my words. These are not drunk, as you suppose, it is only the third hour of the day. But this is what was spoken by the prophet Joel and it shall come to pass in the last days, says God, that I will pour out my spirit on all flesh.  Your young men shall see visions, your old men dream dreams. And on my men servants and on my maid servants, I will pour out my spirit in those days and they shall prophesy. And I will show wonders in heaven above and signs in the earth beneath, blood and fire and vapor of smoke. The sun shall be turned into darkness and the moon into blood before the coming of the great and awesome day of the Lord. And it shall come to pass that whoever calls in the name of the Lord shall be saved. That's a reference to Joel. We looked at Amos chapter eight, Joel chapter two. This is a quotation or a what Peter sees as the fulfillment of this text. It's interesting though, if you look down at verse 19, that although he takes this text, applies it to the pouring out of the Holy Spirit at Pentecost in Acts chapter two, he also quotes the text in full beginning of verse 19 with a reference to the coming, great and terrible day of the Lord. In other words, not seeing it as fulfilled in Acts two, but also quoting that section of text that deals with the coming of the Lord at the end of the age. In verse 19, I will show wonders in heaven. We see that in Matthew chapter 24 verse 29, right? Cosmic signs of the Lord's return. I will show wonders in heaven above, signs in the earth beneath, blood and fire and vapor of smoke. The sun shall be turned into darkness, same kind of language, right? The moon into blood before the coming of the great and awesome day of the Lord. And again, that's the great and awesome day of the Lord. It shall come to pass that whoever calls in the name of the Lord shall be saved. Look at Romans chapter eight. This is also a time that the earth itself is awaiting in anticipation its redemption and groans under the weight of the curse in Romans chapter eight. Look at Romans chapter eight and look down at verse 19. Four, you could say in verse 19, even the earnest expectation of the creation eagerly waits for the revealing of the sons of God. Or the creation was subjected to futility, not willingly, but because of him who subjected it in hope because the creation itself also will be delivered from bondage of corruption into the glorious liberty of the children of God. For we know that the whole creation groans and labors with birth pangs together until now again, same kind of language, right? Creation groaning as we through a period of tribulation, Matthew chapter 24 verse eight, go through the beginning of birth pangs and these signs, these wars and rumors of wars and earthquakes and famines and pestilences as these things increase in frequency and increase in severity, even the creation itself groans under the weight of that. Look at verse 22. We know that the whole creation groans and labors with birth pangs together until now, right? Now Matthew 24 again, back in Matthew chapter 24, dealing then again in verses 29 to 31 with what is still yet to come, dealing with the future. So Matthew 24, after the abomination of desolation, after those events described in verses 15 to 28, after the signs in the heavens described in Matthew chapter 24 verse 29 verse 30 says, then the sign of the Son of Man will appear in heaven and then all the tribes of the earth will mourn and they will see the Son of Man coming on the clouds of heaven with power and with great glory. Now in other words, this sign verse 30 of the coming of the Son of Man will be the coming of the Son of Man himself. He is the final sign, unparalleled in power, unparalleled in glory, overtly visible in the heavens, unmistakable, there's no indication here of a secret return of Lord Jesus Christ that precedes a visible return. This is entirely visible in the heavens, overtly visible, unmistakable. And it's the coming of the Son of Man. I want you to turn back with me to Daniel. Again, I hope you're writing some of these texts down and you'll put these pieces together. Daniel chapter seven in this title comes from a text that we'll look at in small group this week, Daniel chapter seven. Look at verse 13, where Daniel records, I was watching in the night visions and behold, one like the Son of Man coming with the clouds of heaven, he came to the ancient of days and they brought him near before him. Then to him was given dominion and glory and a kingdom that all peoples, nations and languages should serve him. His dominion is an everlasting dominion which shall not pass away and his kingdom the one which shall not be destroyed. Again, I think the connection here between this title, the Son of Man in verse 30 with this reference to the Son of Man in Daniel chapter seven, very important. What Daniel is referencing in Daniel chapter seven is the coming of the Lord Jesus Christ to receive the kingdom, the everlasting dominion that will never be destroyed which shall never pass away. His kingdom ruled by the Lord Jesus Christ, the Son of Man. And again, he references them in verse 13 as coming in the clouds of heaven, coming to the ancient of days and they brought him near before him. Again, language tied to Matthew chapter 24, verse 30, that can't be a reference to something that takes place around the destruction of the temple in AD 70 or couldn't have taken place around the sack of Jerusalem at that time. It still remains future. And again, Matthew chapter 24 verses 29 to 31 speaking of a time that is still yet to come, a time where the future in the future when the Son of Man will appear in heaven. So again, referencing Daniel chapter seven. Again, look at with me at Daniel chapter 12, just a few pages to the right. Daniel chapter 12. And again, speaking of this time, we're referencing these two texts now in Daniel that specifically connect to what the Lord is saying in Matthew chapter 24. You have in Daniel chapter 12, verse one, at that time, Michael shall stand up, the great prince who stands watch over the sons of your people. And there shall be a time of trouble such as never was since there was a nation even to that time. And at that time, your people shall be delivered. Everyone who is found written in the book. Now think with me for a moment. He makes reference in verse two or verse one to a time of trouble such as never was since there was a nation even to that time. Where do we see that before? Back in Matthew chapter 24, right? The Lord Jesus Christ speaks of the great tribulation, a period of tribulation, so great it was greater than any tribulation that had come before it and would be greater than any tribulation that would come after it. Great tribulation. Again, Daniel referring to the same thing here in Daniel chapter 12, a time of trouble, verse one, such as never was since there was a nation even to that time. And at that time, your people shall be delivered. And what does Jesus say in Matthew chapter 24, verse nine, verse 29, immediately after the tribulation of those days, you'll see the signs in heaven and the coming of the Son of man on the clouds, right? So again, Daniel chapter 12, tied specifically to Matthew 24. We're talking about the same sequence of events in the same time period, again in the future. Your people shall be delivered. Everyone who is found written in the book. So what happens when the Lord Jesus Christ comes? When the Son of man comes on the clouds of heaven, he comes to gather his elect from the four corners of the earth. What the Lord Jesus Christ is saying in Matthew 24, ties specifically here to what Daniel is recorded in Daniel chapter 12. Many of those who sleep, this is verse two, many of those who sleep in the dust of the earth shall awake, some to everlasting life, some to shame and everlasting contempt. Those who are wise shall shine like the brightness of the firmament, those who turn many to righteousness, like the stars forever and ever. This is also tied, if we want to consider the sequence of these events and the connectedness of these texts with Matthew chapter 24. We can also consider Revelation chapter six, again, yet future, where verse 12 says this, I looked, when he opened the sixth seal and behold, there was a great earthquake, the sun became black as sackcloth of hair, the moon became like blood, the stars of heaven fell to the earth as fig tree, as a fig tree drops its late figs when it's shaken by a mighty wind, then the sky receded as a scroll when it is rolled up and every mountain and island was moved out of its place. We see that language in Matthew chapter 24, we see that language in Luke 21, we see that language in Mark 13, right? Same language, verse 15, the kings of the earth, the great men, the rich men, the commanders, the mighty men, every slave and every free man, hid themselves in the caves and in the rocks of the mountains and said to the mountains and rocks, fall on us and hide us from the face of him who sits on the throne and from the wrath of the land. For the great day of his wrath has come and who is able to stand? So again, we see the same language there, we use what we see in Matthew chapter 24, verses 29 to 31, speaking of a future time, referenced here again in Revelation chapter 6, verses 12 and following. Look with me again at Zechariah chapter 12, Zechariah chapter 12. We look through Matthew chapter 24, verse 30, he makes reference to the sign of the Son of Man that will appear in heaven and he says that all the tribes of the earth will mourn, all the tribes of the earth will mourn, that's a reference to Zechariah chapter 12. Look there at verse 10, Zechariah chapter 12, verse 10. And I will pour on the house of David and on the inhabitants of Jerusalem, the spirit of grace and supplication, then they will look on me whom they pierced. Yes, they will mourn for him as one mourns for his only Son and grieve for him as one grieves for a firstborn. In that day, there shall be great mourning in Jerusalem, like the mourning at Haddad Ramon and the Plain of Megiddo. And the land shall mourn every family by itself, the family of the house of David by itself and their wives by themselves, the family of the house of Nathan by itself and their wives by themselves, the family of the house of Levi by itself and their wives by themselves, the family of Shimei by itself, their wives by themselves, all the families that remain, every family by itself and their wives by themselves. All right, speaking again of this time at the end when the Son of Man comes, look at chapter 13 and drop down to verse 7, chapter 13, verse 7. Awake, O sword, against my shepherd, against the man who is my companion, says the Lord of hosts. Strike the shepherd and the sheep will be scattered. We see that fulfilled, don't we? In the Garden of Gethsemane, on the night of the Lord's arrest. Then I will return my hand against the little ones and it shall come to pass and all the land says the Lord, that two thirds in it shall be cut off and die, but one third shall be left in it. I will bring the one third through the fire, will refine them as silver is refined and test them as gold is tested. They will call on my name and I will answer them. I will say this is my people. Each one will say the Lord is my God. Behold, chapter 14, verse one, the day of the Lord is coming. Your spoil will be divided in your midst. I will gather all the nations to battle against Jerusalem. The city shall be taken, the house is rifled, the women ravished, half the city shall go into captivity, but the remnant of the people shall not be cut off from the city. Then the Lord will go forth to fight against those nations as he fights in the day of battle. And in that day, his feet will stand on the Mount of Olives, which faces Jerusalem on the east. And the Mount of Olives shall be split in two from east to west, making a very large valley. Half of the mountain shall move toward the north and half of it toward the south. Then you shall flee through my mountain valley for the mountain valley shall reach to Azal. Yes, you shall flee as you fled from the earthquake in the days of Uzziah, King of Judah. Thus the Lord my God will come and all the saints with you. Do you see that? It shall come to pass in that day that there will be no light. The lights will diminish. It shall be one day which is known to the Lord neither day nor night, but at evening time it shall happen that it will be light. In that day it shall be that living water shall flow from Jerusalem, half of them toward the eastern sea. And he continues. Again, what you see in Zechariah chapter 14 specifically, language that apparently points forward to the destruction of the temple in AD 70, but then additionally points forward beyond that again to the coming of the Son of Man and the great and terrible day of the Lord, where these cosmic signs in the heavens will be clearly visible, right? All these texts connecting together now giving us a more clear picture of what the Lord is referring to in Matthew chapter 24 and the Olivet Discourse. Back in Matthew chapter 24, look with me quickly at verse 31. Matthew chapter 24 verse 31. Here the Bible says that he will send his angels with a great sound of a trumpet and they will gather together his elect from the four winds from one end of heaven to the other. So as far as the gospel is preached to all the kingdoms of the earth in verse 14, during that time of tribulation, during the church age in which the gospel of the kingdom is preached to all nations that are heaven, as widely as the gospel is preached will be as widely as he will then come and gather together to himself his elect from the four winds from one end of heaven to the other and all will be ushered into the glory of his kingdom, right? What he says here is the great sound of a trumpet. It's interesting that we'll look at this when we have time going through Daniel, but this correlating to the sound of the trumpet in the Jubilee in Leviticus chapter 25. If you go back and look at Leviticus chapter 25 and look at what is taught there, instructed there with respect to the Jubilee what you have then in terms of Daniel's 70 weeks is a 10-fold Jubilee. What happened to the end of that 10-fold Jubilee? You have here, Matthew chapter 24 verse 31, the great sound of a trumpet, right? So just in the same way that the trumpet sounded at the Jubilee at the end of the Jubilee in Leviticus 25 there will be a great sounding of a trumpet at the end of this Jubilee, of this 70 weeks to so to speak at the end. Again, the sound of a trumpet referenced in 1 Corinthians chapter 15 verse 52, again referenced in 1 Thessalonians chapter 4 verse 16 and here with our time running out, the ushering in of his elect to the glory of his kingdom. Again, we don't know specifically according to Matthew chapter 24 verse 36, no one knows not even the angels of heaven but my Father only knows of that day and the hour that it will come. And so what is the Lord's then instruction to us? It's watch, right? Watch, study, think, meditate on scripture, put these things together, think, study, pray, ask for the Lord's help and to be watchful, be attentive. We don't know when that hour is coming but we certainly pray for it, don't we? In the midst of this wicked and perverse generation Lord Jesus come quickly, amen. Let's pray. Father in heaven, Lord, we do pray for your soon return or the consummation of all things where your saints will rule and reign with you and your kingdom for a thousand years. We look forward to that day or we look forward to your speedy return until that day Lord, if you tarry until that time I pray that we'd be watchful and we would carefully study these things. We would consider what you said in your word. We would think on your word and meditate on your word and Lord, in light of even what Paul says to Titus that we would live in light of the hope of your glorious appearing that it would impact the way that we think, that it would impact the way that we live, impact the things that we desire, impact the way that we think about the things that we have or the things that we're doing help us to have the mindset set on things above, not on things on the earth but set certainly on the certainty of your soon return that we might live for you more fervently, live for you more faithfully, that we might witness as you've called us to during this time preaching the gospel of the kingdom at the ends of the earth and knowing Lord that on that day you'll gather together all of your elect, they will be caught up together with you and we will all sit down at the marriage supper of the lamb and rejoice in the kingdom together worshiping the lamb who is slain. We love you and thank you for these glorious promises I hope in you for them in Jesus' name, amen.