Click here to Skip to main content
15,895,799 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
den2k887-Jun-18 22:25
professionalden2k887-Jun-18 22:25 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Plamen Dragiyski7-Jun-18 23:17
professionalPlamen Dragiyski7-Jun-18 23:17 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
jschell9-Jun-18 5:01
jschell9-Jun-18 5:01 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
User 110609797-Jun-18 6:01
User 110609797-Jun-18 6:01 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
RandyBuchholz7-Jun-18 6:03
RandyBuchholz7-Jun-18 6:03 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Randor 7-Jun-18 6:18
professional Randor 7-Jun-18 6:18 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
CPallini7-Jun-18 6:24
mveCPallini7-Jun-18 6:24 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
CodeWraith7-Jun-18 6:24
CodeWraith7-Jun-18 6:24 
RandyBuchholz wrote:
Have we developed an irrational fear of
Speak for yourself. Smile | :)

Just look what I'm working on right now. Every opcode that starts with B is a branch (= goto). Smile | :)

; =========================================================================================
; BIOS Command selection
;
; Parameters:
; ---
;
; Returns:
; ---
; =========================================================================================

BIOS_Command:		LDI  hi(TxtEnterCommand)
					STXD
					LDI  lo(TxtEnterCommand)
					STXD
					SEP  R4
					dw   WriteLine

CMD_Repeat:			LDI  00FFH						; get RS232 input, max. timeout
					STXD
					SEP  R4
					dw   RS232InSoftware

					IRX								; timeout?				
					LDX
					BZ   CMD_Skip

					STXD							; echo input
					STXD
					SEP	 R4
					dw   RS232Out

					IRX
					LDX
					SDI  006EH						; test input = n	
					BZ   CMD_Exit
					
					LDX
					SDI  0079H				
					BNZ  CMD_Repeat

					LDI  hi(TxtNewLine)				; announce BIOS CMD
					STXD
					LDI  lo(TxtNewLine)
					STXD
					SEP  R4
					dw   WriteLine

					LDI  hi(TxtNewLine)
					STXD
					LDI  lo(TxtNewLine)
					STXD
					SEP  R4
					dw   WriteLine

					LDI  hi(TxtCmdTitle)
					STXD
					LDI  lo(TxtCmdTitle)
					STXD
					SEP  R4
					dw   WriteLine

CMD_Prompt:			LDI  hi(TxtCmdPrompt)			; output the prompt
					STXD
					LDI  lo(TxtCmdPrompt)
					STXD
					SEP  R4
					dw   WriteLine

					LDI  00H						; get RS232 input, no timeout
					STXD
					SEP  R4
					dw   RS232InSoftware
					LDI  TRUE
					PLO  RF

					IRX								; echo input								
					LDX
					STXD
					STXD
					SEP	 R4
					dw   RS232Out
					
					IRX				
					LDX								; test input = x
					SDI  0078H				
					BZ   CMD_Exit

					LDX								; test input = X
					SDI  0058H				
					BZ   CMD_Exit

					LDX								; test input = h
					SDI  0068H				
					BZ   CMD_Help

					LDX								; test input = H
					SDI  0048H				
					BZ   CMD_Help

CMD_Invalid:		LDI  hi(TxtCmdInvalid)			; error message (invalid command)
					STXD
					LDI  lo(TxtCmdInvalid)
					STXD
					SEP  R4
					dw   WriteLine
					BR   CMD_Prompt

CMD_Help:			LDI  hi(TxtCmdHelp)				; help text
					STXD
					LDI  lo(TxtCmdHelp)
					STXD
					SEP  R4
					dw   WriteLine

					LDI  hi(TxtCmdHelp1)
					STXD
					LDI  lo(TxtCmdHelp1)
					STXD
					SEP  R4
					dw   WriteLine
					BR   CMD_Prompt

CMD_Skip:			LDI  hi(TxtSkipped)
					STXD
					LDI  lo(TxtSkipped)
					STXD
					SEP  R4
					dw   WriteLine

CMD_Exit:			SEP  R5

;------------------------------------------------------------------------------------------

I have lived with several Zen masters - all of them were cats.

His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
RandyBuchholz7-Jun-18 6:36
RandyBuchholz7-Jun-18 6:36 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
CodeWraith7-Jun-18 7:00
CodeWraith7-Jun-18 7:00 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Marc Clifton7-Jun-18 6:31
mvaMarc Clifton7-Jun-18 6:31 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
RandyBuchholz7-Jun-18 6:52
RandyBuchholz7-Jun-18 6:52 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Gary Wheeler7-Jun-18 6:50
Gary Wheeler7-Jun-18 6:50 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Navanax8-Jun-18 6:17
Navanax8-Jun-18 6:17 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Rick York7-Jun-18 7:25
mveRick York7-Jun-18 7:25 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
GuyThiebaut7-Jun-18 7:47
professionalGuyThiebaut7-Jun-18 7:47 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
CodeWraith7-Jun-18 10:24
CodeWraith7-Jun-18 10:24 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
kmoorevs7-Jun-18 11:05
kmoorevs7-Jun-18 11:05 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
GuyThiebaut7-Jun-18 20:37
professionalGuyThiebaut7-Jun-18 20:37 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Nathan Minier7-Jun-18 7:53
professionalNathan Minier7-Jun-18 7:53 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Maximilien7-Jun-18 8:00
Maximilien7-Jun-18 8:00 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
OriginalGriff7-Jun-18 8:13
mveOriginalGriff7-Jun-18 8:13 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Eddy Vluggen7-Jun-18 8:16
professionalEddy Vluggen7-Jun-18 8:16 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
RandyBuchholz7-Jun-18 9:04
RandyBuchholz7-Jun-18 9:04 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Eddy Vluggen7-Jun-18 11:09
professionalEddy Vluggen7-Jun-18 11:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.