Or sometimes your own!
Or sometimes your own!
Lol ... that happens to me more frequently than not ... That's why I'm in the habit of heavily commenting my code as if it were a story being told, step by step. I practically never make a flow chart. But I've just finished a project that I think I'll be making one for. A simple one that covers the logic flow so that things are easier to understand when one needs to revisit the nuances of the code later on.Or sometimes your own!
;*****************************************************************************************
;
; Is FSR0 greater than or equal to FSR1?
;
; Both FSRs point to the LSB of an array with NUMBER bytes each. Works with both Hex
; and BCD registers as long as they're both the same type. Will preserve the original
; values of both FSRs
;
; if FSR0 = FSR1 then Z = 1
; if FSR0 <= FSR1 then C = 1
; if FSR0 > FSR1 then C = 0
;
; Destroyed registers: PUSH01
; The original FSRs values are preserved
;
; No memory bank change takes place
;*****************************************************************************************
GTE2_FSR0_FSR1:
MovF2F NUMBER, PUSH01
;make both FSRs registers point to their respective arrays' MSB
decfsz PUSH01, f
goto Point_To_HB
goto Skip_Point_To_HB ;skip if there's only one byte in the arrays
Point_To_HB: ;point to the high byte in both arrays
bsf AUX_FLAGS, FSR_SELECT_FLAG ;work with FSR1
movf PUSH01, w
call Add_W_To_FSRX
bcf AUX_FLAGS, FSR_SELECT_FLAG ;work with FSR0
movf PUSH01, w
call Add_W_To_FSRX
Skip_Point_To_HB:
MovF2F NUMBER, PUSH01
GTE2_Comp_Loop:
moviw 0[FSR0] ;loading w this way allows reading from a dt table
subwf INDF1, w ;compare current bytes
btfss STATUS, Z ;are they equal?
goto Restore_FSRs_Loop ;exit if they're not
addfsr FSR0, -1d ;point to the next byte down
addfsr FSR1, -1d ;this does not affect the STATUS register
decfsz PUSH01, f
goto GTE2_Comp_Loop
addfsr FSR0, d'1' ;if we reached this point, both values are equal
addfsr FSR1, d'1' ;set both FSR to their respective initial condition
goto Exit_GTE2_FSR0_FSR1 ;exit this function immediately
Restore_FSRs_Loop: ;restore the original values of both FSR's if
addfsr FSR0, -1d ;the previous loop exited early
addfsr FSR1, -1d ;restoration is done this way as not to affect
decfsz PUSH01, f ;the values of Z and C
goto Restore_FSRs_Loop
addfsr FSR0, d'1' ;sets both FSR to their respective initial condition
addfsr FSR1, d'1'
Exit_GTE2_FSR0_FSR1:
return
"Apollo 8 was about leaving the Earth and Apollo 11 was about arriving at the moon," Swanson said. "As we look from the vantage point of time, now that over half a century has passed since both of these events occurred, one might pause and ask which was more important?"
It's something that we've seen in that country many times. While sooner or later the end will be different, I'm not seeing any reason for thinking/hoping that this is the one. The regime will crack down brutally on the protestors, lots of people will disappear, and everyone else will duck their heads and go back to simmer for another year or two at which point something else will cause the next round. For better or worse, this is just how their system releases steam.Iran is a total mess.
Nothing can simmer indefinitely. It eventually reaches a boiling point, or catches fire. Iran will have its day sooner than later, I predict. Kudos to the brave few who have the courage to defy the suffocating regime currently ruling their country. I just hope that whatever comes next, it results in a measurable improvement.everyone else will duck their heads and go back to simmer for another year or two
As I said, sooner or later it will end differently. But the fact remains that this is a recurring theme that, thus far, has always ended the same way. And every time there has been no shortage of people insisting that this time is different or not even recognizing that it has happened before, let alone happened repeatedly.Nothing can simmer indefinitely. It eventually reaches a boiling point, or catches fire. Iran will have its day sooner than later, I predict. Kudos to the brave few who have the courage to defy the suffocating regime currently ruling their country. I just hope that whatever comes next, it results in a measurable improvement.
The lack of food and water for the masses is an added accelerant this time but you're right. I've watched them protest and get beaten (I trained with their forces in the States when Carter was in office) down and be brutally murdered before and after the 1979 revolution. The entire population today there have little left to lose so I do think it's at the breaking point soon for some sort of change but not for the better unless the mass population is willing to burn it down for a reset to the next stage as the old guys die out but the old crew is still running the show.It's something that we've seen in that country many times. While sooner or later the end will be different, I'm not seeing any reason for thinking/hoping that this is the one. The regime will crack down brutally on the protestors, lots of people will disappear, and everyone else will duck their heads and go back to simmer for another year or two at which point something else will cause the next round. For better or worse, this is just how their system releases steam.

Really sad story that keeps repeating all over the world. Pyrotechnics are an absolute WMD in these types of events.Hello,
It looks like the sound reduction mat got fire.
Bertus
Sure, it's always something that burns but it's the smoke that mass kills usually. Backdraft when the doors opened created pressure flame wave front as the fresh oxygen mixes with smoke. It's something we trained for in Navy firefighter school. Stay low and kiss the deck.Pyrotechnics started the ignition. But Bertus is right, that's sound reducing foam material of the same type used in recording studios. It's probably there to improve the room's acoustics.
What draws my attention is how quickly it caught fire. That thing had zero flame retardant in it if I'm not mistaken. And also, it is reported that a series of explosions (or fireballs ... the investigation is ongoing) quickly followed afterwards. I wonder what the cause was.
Booze and fire ... a terrible, terrible mix ...
And, as usual, there's no shortage of idiots who aren't going to help fight the fire, who aren't going to evacuate a burning building, and who aren't going to get the hell out of the way of the people that are going to fight the fire or are trying to get the hell out of building. But, they can be counted on to pull out there phones and video it in search of that all important viral video they all so desperately want.