The Geek Forum

  • April 28, 2024, 06:26:57 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Due to the prolific nature of these forums, poster aggression is advised.

*

Recent Forum Posts

Shout Box

Members
Stats
  • Total Posts: 129555
  • Total Topics: 7152
  • Online Today: 278
  • Online Ever: 1013
  • (January 12, 2023, 01:18:11 AM)

Author Topic: Elevator 1.0  (Read 5832 times)

Novice

  • Forum Ninja
  • Hacker
  • ****
  • Coolio Points: +205/-10
  • Offline Offline
  • Gender: Male
  • Posts: 1463
  • Thread Killer 3.0
    • View Profile
Elevator 1.0
« on: May 09, 2010, 10:23:19 PM »

Exactly 1500 lines of pure, 8086 microprocessor based assembly code.

-4 Floors, (0=basement, 1=ground)
-7 segment display showing floor and direction of travel
-Queue system that takes in new input at ANY time during the program and queues the destination for later travel
-Uses system time to calculate time between floors (5sec), time for door opening and closing (3sec), and a wait time for the doors. (For instance if they open at your destination and need to close to go to another destination) (3sec).
-Alarm bypass
-1st floor bypass

If you really want to build and run this, it's 16-bit masm. I'll send you my include file if you want it, but you'll need some extra stuff. Don't ask me what.

If you're REALLY interested, maybe I'll host the .exe.

FIFTEEN HUNDRED :-D

[aeva][aeva]
Code: [Select]
TITLE Elevator              (16-bit.asm)

;Elevator Final Project Assembly
;Joey Huggins | v959s342

;Floors setup:
;0 : Basement floor
;1 : Ground floor : Main floor : Starting location
;2 : Floor 2
;3 : Floor 3

;The program uses the system time to calculate the time it takes between floors, time to open / close doors.

INCLUDE Irvine16.inc

.data
ArrayU BYTE 15 DUP (99)
ArrayD BYTE 15 DUP (99)
BypassV BYTE 0
AlarmV BYTE 0
Counter BYTE 0
TravelCounter BYTE 0
InsideB BYTE 0
OutsideB BYTE 0
Up BYTE 0
Down BYTE 0
Closed BYTE 1
Open BYTE 0
Opening BYTE 0
Closing BYTE 0
Floor BYTE 1
Moving BYTE 0
InvalidV BYTE 0
NextFloor BYTE 0
Difference BYTE 0
ArraySizeU BYTE 0
ArraySizeD BYTE 0
firstChar BYTE ?,0
secondChar BYTE ?,0
msgFloor BYTE 0ah,0dh,"Floor: ",0
msgChanging BYTE 0ah,0dh, "Elevator moving . . .",0
msgOpening BYTE 0ah,0dh,"Doors opening . . .",0
msgClosing BYTE 0ah,0dh,"Doors closing . . .",0
msgOpen BYTE 0ah,0dh, "Doors Open",0
msgClosed BYTE 0ah,0dh, "Doors Closed",0
msgControls BYTE "Controls:",0ah,0dh,0ah,0dh, "Type 0-3 For your current floor (Outside controls) or 'i' for Inside controls",0ah,0dh
 BYTE "If outside: Type Up(u), Down(d), or Bypass(b) on ground floor",0ah,0dh
 BYTE "If inside: Type destination floor 0-3, Close doors(c), Open doors(o) or Alarm(a)",0ah,0dh,0
msgExamples BYTE 0ah,0dh, "Example:", 0ah,0dh, "Typing '1u' means you are on ground floor and want to go up",0ah,0dh
 BYTE "Typing 'i2' means you are in the elevator and want to go to floor 2",0ah,0dh
 BYTE "Typing 'io' means you are on the inside and want the doors open.",0ah,0dh,0
msgTest BYTE 0ah,0dh, "To continue, type the sequence for outside controls on floor 3 going down : ",0
msgInvalid BYTE 0ah,0dh, "Invalid key pressed, please start your control sequence over again",0
msgBypass BYTE 0ah,0dh, "All destinations cleared. Returning to first floor.",0
msgAlarm BYTE 0ah,0dh, "Alarm activated. Returning to first floor and shutting down operation.",0
msgMoving BYTE 0ah,0dh, "Elevator moving. Doors remaining closed.",0
msgClean BYTE 0ah,0dh,0ah,0dh,0
msgSegment1 BYTE "   _",0ah,0dh,0
msgSegment2 BYTE "  |",0
msgSegment3 BYTE "_",0
msgSegment4 BYTE "|",0ah,0dh,0
msgSegment5 BYTE "  |",0
msgSegment6 BYTE "_",0
msgSegment7 BYTE "|",0,0ah,0dh,0
msgSegmentF BYTE " ",0
msgSegmentFR BYTE " ",0ah,0dh,0
msgSegmentFS BYTE "    ",0
msgSegmentFSR BYTE "    ",0ah,0dh,0
msgSegmentFSS BYTE "   ",0


.code
main PROC
mov ax,@data
mov ds,ax

call ClrScr

;;;;;;;;;;;;
;;;;INITIAL : START
;;;;;;;;;;;;


mov edx, OFFSET msgControls
call WriteString
mov edx, OFFSET msgExamples
call WriteString

Initial: ;Ask Cu to try a sequence. This part makes sure the user knows how to
;control the evelator program by asking for a specific action

mov edx, OFFSET msgTest
call WriteString

call ReadChar
mov firstChar, al

cmp al,33h

jz Next
jmp Initial

Next: ;First Character is OK

call ReadChar
mov secondChar, al

cmp al,64h
jz Correct

Correct::
CALL Displayp

DisplayDoneCorrect:

;;;;;;;;;;;;
;;;;INITIAL : END
;;;;;;;;;;;;

mov edi, OFFSET ArrayD ;Check if the queue's are empty
mov esi, OFFSET ArrayU
cmp BYTE PTR [esi], 99 ;99 is the empty value. Because 0 is a valid floor (basement)
jz NextQueue
jmp NotEmpty
NextQueue:
cmp BYTE PTR [edi], 99
jz QueueEmpty
jmp NotEmpty

QueueEmpty:
mov Moving, 0
mov Up, 0
mov Down, 0
CALL DisplayP

DisplayDoneQueueEmpty:

mov ah, 10h
int 16h

inc Counter ;Are we on the first or second entry

cmp OutsideB, 1 ;If OutsideB is 1, the previous key was from the outside controls and we are getting a 'u' or 'd'
jz Outside21 ;Signal (though, it doesn't really matter).
jmp FirstCase1

Outside21:
mov OutsideB, 0
cmp al, 62h
jz Bypass1
jmp BufferDone1 ;It shouldn't make a difference if the person is going up or down. They will actually
;Make the decision based on what they press inside. So we just skip the u or d.
Bypass1:
CALL BypassP
jmp Correct

FirstCase1:

cmp InsideB, 1 ;If InsideB is 1, that means the previous key was 'i' for inside
jz Inside21

cmp al, 69h ;if the key is i
jz Inside1

cmp al, 30h
jz Number1
cmp al, 31h
jz Number1
cmp al, 32h
jz Number1
cmp al, 33h
jz Number1

Invalid1: ;Key doesn't match anything acceptable. So we let the user know and end the buffercheck.
mov InsideB, 0 ;Go ahead and clear buffer
mov ah, 11h
int 16h
mov InvalidV, 1
CALL DisplayP
mov InvalidV, 0
jmp BufferDone1

Number1:
;If outside, grab number and make sure we grab the u or d afterwards
cmp InsideB, 1 ;If i was the last key then the number is coming from the inside.
jnz SetOutsideB1
jz DontSetOutside1

SetOutsideB1: ;If i was not the last key, then the number is on the outside
mov OutsideB, 1 ;And we need to set the outside boolean so we can catch the u or d the next time around when we check the buffer
mov bl, Floor
add bl, 30h
cmp bl, al ;Is the destination above or below current floor. See below for if they are the same
js GoingUp1 ;Destination is above the current floor
jmp GoingDown1 ;Destination is below current floor

DontSetOutside1:
mov InsideB, 0 ;The inside sequence is done, so we can reset the boolean
mov bl, Floor ;Put the current floor in a register to check
add bl, 30h ;Make the floor it's ASCII value
cmp bl, al ;Is the destination higher or lower than the current floor
jz DoCallOpen1 ;You're on the destination floor. Open the doors if they are closed.

js GoingUp1 ;Destination is above the current floor
jmp GoingDown1 ;Destination is below current floor

GoingDown1:
mov NextFloor, al
jmp BufferDone1

GoingUp1:
mov NextFloor, al
jmp BufferDone1

Inside1:
mov InsideB, 1 ;If the user entered i, then we need to know the next entry will be an inside option
jmp BufferDone1

Inside21: ;If the previous key was an i
cmp al, 61h
jz Alarm1
cmp al, 6fh
jz DoCallOpen1
cmp al, 63h
jz DoCallClosed1
cmp al, 30h
jz Number1
cmp al, 31h
jz Number1
cmp al, 32h
jz Number1
cmp al, 33h
jz Number1

jmp Invalid1

DoCallOpen1:
CALL OpenDoors
mov InsideB, 0
mov Counter, 0
jmp Correct

DoCallClosed1:
CALL CloseDoors
mov InsideB, 0
mov Counter, 0
jmp Correct

Alarm1:
CALL AlarmP

BufferDone1:

cmp Counter, 2
jz Move
jmp QueueEmpty

NotEmpty:

mov esi, OFFSET ArrayU
mov edi, OFFSET ArrayD

cmp ArraySizeU, 0
jz EndBubbleSortU
cmp ArraySizeU, 1
jz EndBubbleSortU

;;;;;;;;;;BubbleSort Up

movzx ecx, ArraySizeU
dec ecx

B1:
push ecx

B2:
mov al, BYTE PTR [esi]
cmp BYTE PTR [esi+1],al
jge B3
xchg al, BYTE PTR [esi+1]
mov BYTE PTR [esi],al

B3:
add esi, 1
loop B2

pop ecx
loop B1

EndBubbleSortU:

cmp ArraySizeD, 0
jz EndBubbleSort
cmp ArraySizeD, 1
jz EndBubbleSort

;;;;;;;;;BubbleSort Down

movzx ecx, ArraySizeD
dec ecx

F1:
push ecx

F2:
mov al, BYTE PTR [edi]
cmp BYTE PTR [edi+1],al
jge F3
xchg al,BYTE PTR [edi+1]
mov BYTE PTR [edi],al

F3:
add edi, 1
loop F2

pop ecx
loop F1

EndBubbleSort:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

mov bl, Up
cmp bl, 1
jz IsThereAnUp
jmp IsThereADown

IsThereAnUp:
mov esi, OFFSET ArrayU
cmp BYTE PTR [esi], 99
jnz MoveUp

IsThereADown:
mov edi, OFFSET ArrayD
cmp BYTE PTR [edi], 99
jnz MoveDown

MoveUp:
mov Up, 1
mov Down, 0
mov esi, OFFSET ArrayU
mov bl, BYTE PTR [esi]
mov NextFloor, bl
mov BYTE PTR [esi], 99 ;Replace element with a 99
mov bl, ArraySizeU
sub bl, 1
mov ArraySizeU, bl
jmp Move

MoveDown:
mov Up, 0
mov Down, 1
mov edi, OFFSET ArrayD

GrabTop:
add edi, 1
cmp BYTE PTR [edi], 99 ;At this point, there should be at least one element in the array so
;We shouldn't have to check for an empty array again
jnz GrabTop
sub edi, 1
mov bl, BYTE PTR [edi] ;If the element we are at is a 99, we need to go back one.
mov NextFloor, bl
mov BYTE PTR [edi], 99 ;Replace element with a 99
mov bl, ArraySizeD
sub bl, 1
mov ArraySizeD, bl
jmp Move

Move::
cmp AlarmV, 1
jz AlarmCalled
CALL DoorWait

mov OutsideB, 0
mov InsideB, 0
mov Counter, 0
cmp Open, 1
jz DoCloseTheDoors
jmp TheyAlreadyDoneDid

DoCloseTheDoors:
CALL CloseDoors
CALL DisplayP


TheyAlreadyDoneDid:
AlarmCalled:

mov bl, BypassV
cmp bl, 1
jz Bypassing
mov bl, AlarmV
cmp bl, 1
jz Alarming
jmp NothingSpecial

Alarming:
CALL CloseDoors
CALL DisplayP

mov NextFloor, 31h
jmp NothingSpecial

Bypassing:
CALL DisplayP

mov NextFloor, 1
jmp NothingSpecial

NothingSpecial:

mov bl, Floor
add bl, 30h
cmp bl, NextFloor
jz CallOpenDoors
js SetUp
jmp SetDown

CallOpenDoors:
CALL OpenDoors
jmp Correct

SetUp:
mov Up, 1
mov Down, 0
mov bl, Floor
add bl, 30h
jmp FindDifferenceU

SetDown:
mov Up, 0
mov Down, 1
mov bl, Floor
add bl, 30h
jmp FindDifferenceD

FindDifferenceU:
mov Up, 1
mov Down, 0
inc Difference
inc bl
cmp bl, NextFloor
jz DirectionFound
jmp FindDifferenceU

FindDifferenceD:
mov Down, 1
mov Up, 0
inc Difference
sub bl, 1
cmp bl, NextFloor
jz DirectionFound
jmp FindDifferenceD

DirectionFound:
mov TravelCounter, 0

TimeBetweenFloors:
mov Moving, 1
Call DisplayP

;;;;;;;;;;;;
;;;;TIME BETWEEN FLOORS : START
;;;;;;;;;;;;

mov ah, 2Ch ;Get time. Seconds are in DH, minutes in CL
int 21h

mov ah, dh ;ah = dh = seconds
mov bl, cl ;bl = cl = minutes

CheckTime: ;Start the checktime 'loop'
push ax ;Push the seconds we initially grabbed

;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;KEYBOARD BUFFER JUNK : START
;;;;;;;;;;;;;;;;;;;;;;;

mov ah, 11h ;This is the code for checking the keyboard buffer.
int 16h   ;If the zero flag is set, there is nothing in the buffer
jz BufferDone
;If the zero flag is not set, we can remove the key from the buffer
mov ah, 10h
int 16h

cmp OutsideB, 1 ;If OutsideB is 1, the previous key was from the outside controls and we are getting a 'u' or 'd'
jz Outside2 ;Signal (though, it doesn't really matter).
jmp FirstCase

Outside2:
mov OutsideB, 0
cmp al, 62h
jz Bypass
jmp BufferDone ;It shouldn't make a difference if the person is going up or down. They will actually
;Make the decision based on what they press inside. So we just skip the u or d.
Bypass:
CALL BypassP
jmp Correct

FirstCase:

cmp InsideB, 1 ;If InsideB is 1, that means the previous key was 'i' for inside
jz Inside2

cmp al, 69h ;if the key is i
jz Inside

cmp al, 30h
jz Number
cmp al, 31h
jz Number
cmp al, 32h
jz Number
cmp al, 33h
jz Number

Invalid: ;Key doesn't match anything acceptable. So we let the user know and end the buffercheck.
mov InsideB, 0 ;Go ahead and clear buffer
mov ah, 11h
int 16h
mov InvalidV, 1
CALL DisplayP
mov InvalidV, 0
jmp BufferDone

Number:
;If outside, grab number and make sure we grab the u or d afterwards
cmp InsideB, 1 ;If i was the last key then the number is coming from the inside.
jnz SetOutsideB
jz DontSetOutside

SetOutsideB: ;If i was not the last key, then the number is on the outside
mov OutsideB, 1 ;And we need to set the outside boolean so we can catch the u or d the next time around when we check the buffer
mov bl, Floor
add bl, 30h
cmp bl, al ;Is the destination above or below current floor. See below for if they are the same
js GoingUp ;Destination is above the current floor
jmp GoingDown ;Destination is below current floor

DontSetOutside:
mov InsideB, 0 ;The inside sequence is done, so we can reset the boolean
mov bl, Floor ;Put the current floor in a register to check
add bl, 30h ;Make the floor it's ASCII value
cmp bl, al ;Is the destination higher or lower than the current floor (though we're moving)
jz BufferDone ;For now at least, if we just came from the destination floor, then I'm not going
;to add it to the queue. You can add it again when you reach the next floor.
js GoingUp ;Destination is above the current floor
jmp GoingDown ;Destination is below current floor

GoingDown:
mov edi, OFFSET ArrayD
cmp BYTE PTR [edi], 99
jz LCA
LC: ;esi and edi aren't always going to point to the next open space so we have to find it
add edi, 1
cmp BYTE PTR [edi], 99
jz LCA
jnz LC
LCA:
mov BYTE PTR [edi], al ;edi points to ArrayD
inc ArraySizeD
jmp BufferDone

GoingUp:
mov esi, OFFSET ArrayU
cmp BYTE PTR [esi], 99
jz LC2A
LC2:
add esi, 1
cmp BYTE PTR [esi], 99
jz LC2A
jnz LC2
LC2A:
mov BYTE PTR [esi], al ;esi points to ArrayU
inc ArraySizeU
jmp BufferDone

Inside:
mov InsideB, 1 ;If the user entered i, then we need to know the next entry will be an inside option
jmp BufferDone

Inside2: ;If the previous key was an i
cmp al, 61h
jz Alarm
cmp al, 6fh
jmp BufferDone
cmp al, 63h
jz BufferDone
cmp al, 30h
jz Number
cmp al, 31h
jz Number
cmp al, 32h
jz Number
cmp al, 33h
jz Number

jmp Invalid

Alarm:
CALL AlarmP

BufferDone:

;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;KEYBOARD BUFFER JUNK : END
;;;;;;;;;;;;;;;;;;;;;;;

mov ah, 2Ch ;Get current time (new time)
int 21h

pop ax ;Get back old seconds

sub dh,ah ;New seconds - Old Seconds = difference

js YAdd ;If the subtraction changed the sign flag (rollover), we need to add 60 to the result
jmp NAdd ;Otherwise, go ahead and subtract 5 from the difference to check.

YAdd: ;If there was a rollover, add 60 to the difference
add dh,60

NAdd: ;There was no rollover just continue
sub dh,5 ;Difference - 5

jz Over ;If the difference between the seconds is 5 (5 - 5 = 0), we're done counting
jnz CheckTime ;Otherwise, repeat loop and continue to check the time.

Over:

inc TravelCounter

cmp Up,1
jz IncreaseFloor
jmp DecreaseFloor

IncreaseFloor:
inc Floor
jmp ChangeFloorsDone
DecreaseFloor:
mov bl, Floor
sub bl, 1
mov Floor, bl

ChangeFloorsDone:

mov bl, Difference

cmp bl, TravelCounter
jnz TimeBetweenFloors

;;;;;;;;;;;;
;;;;TIME BETWEEN FLOORS : END
;;;;;;;;;;;;

cmp AlarmV, 1
jz EndItAll

mov bl, NextFloor
sub bl, 30h
mov Floor, bl
mov TravelCounter, 0
mov Difference, 0
mov Moving, 0
CALL OpenDoors
jmp Correct

EndItAll::

CALL DisplayP

exit
main ENDP

OpenDoors PROC
cmp Open, 1
jz DoorsAreOpen
jmp NoTheyAint
DoorsAreOpen:
ret
NoTheyAint:
mov Opening, 1
mov Closing, 0
mov Open, 0
mov Closed, 0
CALL DisplayP

mov ah, 2Ch ;Get time. Seconds are in DH, minutes in CL
int 21h

mov ah, dh ;ah = dh = seconds
mov bl, cl ;bl = cl = minutes

CheckTime: ;Start the checktime 'loop'
push ax ;Push the seconds we initially grabbed

mov bl, AlarmV
cmp bl, 1
jz BufferDone

;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;KEYBOARD BUFFER JUNK : START
;;;;;;;;;;;;;;;;;;;;;;;

mov ah, 11h ;This is the code for checking the keyboard buffer.
int 16h   ;If the zero flag is set, there is nothing in the buffer
jz BufferDone
;If the zero flag is not set, we can remove the key from the buffer
mov ah, 10h
int 16h

cmp OutsideB, 1 ;If OutsideB is 1, the previous key was from the outside controls and we are getting a 'u' or 'd'
jz Outside2 ;Signal (though, it doesn't really matter).
jmp FirstCase

Outside2:
mov OutsideB, 0
cmp al, 62h
jz Bypass
jmp BufferDone ;It shouldn't make a difference if the person is going up or down. They will actually
;Make the decision based on what they press inside. So we just skip the u or d.
Bypass:
CALL BypassP
jmp Correct

FirstCase:

cmp InsideB, 1 ;If InsideB is 1, that means the previous key was 'i' for inside
jz Inside2

cmp al, 69h ;if the key is i
jz Inside

cmp al, 30h
jz Number
cmp al, 31h
jz Number
cmp al, 32h
jz Number
cmp al, 33h
jz Number

Invalid: ;Key doesn't match anything acceptable. So we let the user know and end the buffercheck.
mov InsideB, 0 ;Go ahead and clear buffer
mov ah, 11h
int 16h
mov InvalidV, 1
CALL DisplayP
mov InvalidV, 0
jmp BufferDone

Number:
;If outside, grab number and make sure we grab the u or d afterwards
cmp InsideB, 1 ;If i was the last key then the number is coming from the inside.
jnz SetOutsideB
jz DontSetOutside

SetOutsideB: ;If i was not the last key, then the number is on the outside
mov OutsideB, 1 ;And we need to set the outside boolean so we can catch the u or d the next time around when we check the buffer
mov bl, Floor
add bl, 30h
cmp bl, al ;Is the destination above or below current floor. See below for if they are the same
js GoingUp ;Destination is above the current floor
jmp GoingDown ;Destination is below current floor

DontSetOutside:
mov InsideB, 0 ;The inside sequence is done, so we can reset the boolean
mov bl, Floor ;Put the current floor in a register to check
add bl, 30h ;Make the floor it's ASCII value
cmp bl, al ;Is the destination higher or lower than the current floor (though we're moving)
jz BufferDone ;For now at least, if we just came from the destination floor, then I'm not going
;to add it to the queue. You can add it again when you reach the next floor.
js GoingUp ;Destination is above the current floor
jmp GoingDown ;Destination is below current floor

GoingDown:
mov edi, OFFSET ArrayD
cmp BYTE PTR [edi], 99
jz LCA
LC: ;esi and edi aren't always going to point to the next open space so we have to find it
add edi, 1
cmp BYTE PTR [edi], 99
jz LCA
jnz LC
LCA:
mov BYTE PTR [edi], al ;edi points to ArrayD
inc ArraySizeD
jmp BufferDone

GoingUp:
mov esi, OFFSET ArrayU
cmp BYTE PTR [esi], 99
jz LC2A
LC2:
add esi, 1
cmp BYTE PTR [esi], 99
jz LC2A
jnz LC2
LC2A:
mov BYTE PTR [esi], al ;esi points to ArrayU
inc ArraySizeU
jmp BufferDone

Inside:
mov InsideB, 1 ;If the user entered i, then we need to know the next entry will be an inside option
jmp BufferDone

Inside2: ;If the previous key was an i
cmp al, 61h
jz Alarm
cmp al, 6fh
jmp BufferDone
cmp al, 63h
jz DoCallCloseDoors
cmp al, 30h
jz Number
cmp al, 31h
jz Number
cmp al, 32h
jz Number
cmp al, 33h
jz Number

jmp Invalid

DoCallCloseDoors:
CALL CloseDoors
jmp Correct

Alarm:
CALL AlarmP

BufferDone:

;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;KEYBOARD BUFFER JUNK : END
;;;;;;;;;;;;;;;;;;;;;;;

mov ah, 2Ch ;Get current time (new time)
int 21h

pop ax ;Get back old seconds

sub dh,ah ;New seconds - Old Seconds = difference

js YAdd ;If the subtraction changed the sign flag (rollover), we need to add 60 to the result
jmp NAdd ;Otherwise, go ahead and subtract 3 from the difference to check.

YAdd: ;If there was a rollover, add 60 to the difference
add dh,60

NAdd: ;There was no rollover just continue
sub dh,3 ;Difference - 3

jz Over ;If the difference between the seconds is 3 (3 - 3 = 0), we're done counting
jnz CheckTime ;Otherwise, repeat loop and continue to check the time.

Over:

mov Open, 1
mov Closed, 0
mov Closing, 0
mov Opening, 0

mov bl, AlarmV
cmp bl, 1
jz EndItAll

mov BypassV, 0

ret
OpenDoors ENDP

CloseDoors PROC
cmp Closed, 1
jz DoorsAreClosed
jmp NoTheyAint
DoorsAreClosed:
ret
NoTheyAint:
mov Closing, 1
mov Closed, 0
mov Open, 0
mov Moving, 0
CALL DisplayP

mov ah, 2Ch ;Get time. Seconds are in DH, minutes in CL
int 21h

mov ah, dh ;ah = dh = seconds
mov bl, cl ;bl = cl = minutes

CheckTime: ;Start the checktime 'loop'
push ax ;Push the seconds we initially grabbed

;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;KEYBOARD BUFFER JUNK : START
;;;;;;;;;;;;;;;;;;;;;;;

mov ah, 11h ;This is the code for checking the keyboard buffer.
int 16h   ;If the zero flag is set, there is nothing in the buffer
jz BufferDone
;If the zero flag is not set, we can remove the key from the buffer
mov ah, 10h
int 16h

cmp OutsideB, 1 ;If OutsideB is 1, the previous key was from the outside controls and we are getting a 'u' or 'd'
jz Outside2 ;Signal (though, it doesn't really matter).
jmp FirstCase

Outside2:
mov OutsideB, 0
cmp al, 62h
jz Bypass
jmp BufferDone ;It shouldn't make a difference if the person is going up or down. They will actually
;Make the decision based on what they press inside. So we just skip the u or d.
Bypass:
CALL BypassP
jmp Correct

FirstCase:

cmp InsideB, 1 ;If InsideB is 1, that means the previous key was 'i' for inside
jz Inside2

cmp al, 69h ;if the key is i
jz Inside

cmp al, 30h
jz Number
cmp al, 31h
jz Number
cmp al, 32h
jz Number
cmp al, 33h
jz Number

Invalid: ;Key doesn't match anything acceptable. So we let the user know and end the buffercheck.
mov InsideB, 0 ;Go ahead and clear buffer
mov ah, 11h
int 16h
mov InvalidV, 1
CALL DisplayP
mov InvalidV, 0
jmp BufferDone

Number:
;If outside, grab number and make sure we grab the u or d afterwards
cmp InsideB, 1 ;If i was the last key then the number is coming from the inside.
jnz SetOutsideB
jz DontSetOutside

SetOutsideB: ;If i was not the last key, then the number is on the outside
mov OutsideB, 1 ;And we need to set the outside boolean so we can catch the u or d the next time around when we check the buffer
mov bl, Floor
add bl, 30h
cmp bl, al ;Is the destination above or below current floor. See below for if they are the same
js GoingUp ;Destination is above the current floor
jmp GoingDown ;Destination is below current floor

DontSetOutside:
mov InsideB, 0 ;The inside sequence is done, so we can reset the boolean
mov bl, Floor ;Put the current floor in a register to check
add bl, 30h ;Make the floor it's ASCII value
cmp bl, al ;Is the destination higher or lower than the current floor (though we're moving)
jz BufferDone ;For now at least, if we just came from the destination floor, then I'm not going
;to add it to the queue. You can add it again when you reach the next floor.
js GoingUp ;Destination is above the current floor
jmp GoingDown ;Destination is below current floor

GoingDown:
mov edi, OFFSET ArrayD
cmp BYTE PTR [edi], 99
jz LCA
LC: ;esi and edi aren't always going to point to the next open space so we have to find it
add edi, 1
cmp BYTE PTR [edi], 99
jz LCA
jnz LC
LCA:
mov BYTE PTR [edi], al ;edi points to ArrayD
inc ArraySizeD
jmp BufferDone

GoingUp:
mov esi, OFFSET ArrayU
cmp BYTE PTR [esi], 99
jz LC2A
LC2:
add esi, 1
cmp BYTE PTR [esi], 99
jz LC2A
jnz LC2
LC2A:
mov BYTE PTR [esi], al ;esi points to ArrayU
inc ArraySizeU
jmp BufferDone

Inside:
mov InsideB, 1 ;If the user entered i, then we need to know the next entry will be an inside option
jmp BufferDone

Inside2: ;If the previous key was an i
cmp al, 61h
jz Alarm
cmp al, 6fh
jz DoCallOpenDoors
cmp al, 63h
jmp BufferDone
cmp al, 30h
jz Number
cmp al, 31h
jz Number
cmp al, 32h
jz Number
cmp al, 33h
jz Number

jmp Invalid

DoCallOpenDoors:
CALL OpenDoors
jmp Correct

Alarm:
CALL AlarmP

BufferDone:

;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;KEYBOARD BUFFER JUNK : END
;;;;;;;;;;;;;;;;;;;;;;;

mov ah, 2Ch ;Get current time (new time)
int 21h

pop ax ;Get back old seconds

sub dh,ah ;New seconds - Old Seconds = difference

js YAdd ;If the subtraction changed the sign flag (rollover), we need to add 60 to the result
jmp NAdd ;Otherwise, go ahead and subtract 5 from the difference to check.

YAdd: ;If there was a rollover, add 60 to the difference
add dh,60

NAdd: ;There was no rollover just continue
sub dh,3 ;Difference - 3

jz Over ;If the difference between the seconds is 3 (3 - 3 = 0), we're done counting
jnz CheckTime ;Otherwise, repeat loop and continue to check the time.

Over:

mov Open, 0
mov Closed, 1
mov Closing, 0
mov Opening, 0

ret
CloseDoors ENDP

DoorWait PROC
mov ah, 2Ch ;Get time. Seconds are in DH, minutes in CL
int 21h

mov ah, dh ;ah = dh = seconds
mov bl, cl ;bl = cl = minutes

CheckTime: ;Start the checktime 'loop'
push ax ;Push the seconds we initially grabbed

mov bl, AlarmV
cmp bl, 1
jz BufferDone

;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;KEYBOARD BUFFER JUNK : START
;;;;;;;;;;;;;;;;;;;;;;;

mov ah, 11h ;This is the code for checking the keyboard buffer.
int 16h   ;If the zero flag is set, there is nothing in the buffer
jz BufferDone
;If the zero flag is not set, we can remove the key from the buffer
mov ah, 10h
int 16h

cmp OutsideB, 1 ;If OutsideB is 1, the previous key was from the outside controls and we are getting a 'u' or 'd'
jz Outside2 ;Signal (though, it doesn't really matter).
jmp FirstCase

Outside2:
mov OutsideB, 0
cmp al, 62h
jz Bypass
jmp BufferDone ;It shouldn't make a difference if the person is going up or down. They will actually
;Make the decision based on what they press inside. So we just skip the u or d.
Bypass:
CALL BypassP
jmp Correct

FirstCase:

cmp InsideB, 1 ;If InsideB is 1, that means the previous key was 'i' for inside
jz Inside2

cmp al, 69h ;if the key is i
jz Inside

cmp al, 30h
jz Number
cmp al, 31h
jz Number
cmp al, 32h
jz Number
cmp al, 33h
jz Number

Invalid: ;Key doesn't match anything acceptable. So we let the user know and end the buffercheck.
mov InsideB, 0 ;Go ahead and clear buffer
mov ah, 11h
int 16h
mov InvalidV, 1
CALL DisplayP
mov InvalidV, 0
jmp BufferDone

Number:
;If outside, grab number and make sure we grab the u or d afterwards
cmp InsideB, 1 ;If i was the last key then the number is coming from the inside.
jnz SetOutsideB
jz DontSetOutside

SetOutsideB: ;If i was not the last key, then the number is on the outside
mov OutsideB, 1 ;And we need to set the outside boolean so we can catch the u or d the next time around when we check the buffer
mov bl, Floor
add bl, 30h
cmp bl, al ;Is the destination above or below current floor. See below for if they are the same
js GoingUp ;Destination is above the current floor
jmp GoingDown ;Destination is below current floor

DontSetOutside:
mov InsideB, 0 ;The inside sequence is done, so we can reset the boolean
mov bl, Floor ;Put the current floor in a register to check
add bl, 30h ;Make the floor it's ASCII value
cmp bl, al ;Is the destination higher or lower than the current floor (though we're moving)
jz BufferDone ;For now at least, if we just came from the destination floor, then I'm not going
;to add it to the queue. You can add it again when you reach the next floor.
js GoingUp ;Destination is above the current floor
jmp GoingDown ;Destination is below current floor

GoingDown:
mov edi, OFFSET ArrayD
cmp BYTE PTR [edi], 99
jz LCA
LC: ;esi and edi aren't always going to point to the next open space so we have to find it
add edi, 1
cmp BYTE PTR [edi], 99
jz LCA
jnz LC
LCA:
mov BYTE PTR [edi], al ;edi points to ArrayD
inc ArraySizeD
jmp BufferDone

GoingUp:
mov esi, OFFSET ArrayU
cmp BYTE PTR [esi], 99
jz LC2A
LC2:
add esi, 1
cmp BYTE PTR [esi], 99
jz LC2A
jnz LC2
LC2A:
mov BYTE PTR [esi], al ;esi points to ArrayU
inc ArraySizeU
jmp BufferDone

Inside:
mov InsideB, 1 ;If the user entered i, then we need to know the next entry will be an inside option
jmp BufferDone

Inside2: ;If the previous key was an i
cmp al, 61h
jz Alarm
cmp al, 6fh
jz MaybeOpenDoors
cmp al, 63h
jz MaybeCloseDoors
cmp al, 30h
jz Number
cmp al, 31h
jz Number
cmp al, 32h
jz Number
cmp al, 33h
jz Number

jmp Invalid

MaybeOpenDoors:
CALL OpenDoors
jmp BufferDone

MaybeCloseDoors:
cmp Closed, 1
jz BufferDone
CALL CloseDoors
jmp BufferDone

Alarm:
CALL AlarmP

BufferDone:

;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;KEYBOARD BUFFER JUNK : END
;;;;;;;;;;;;;;;;;;;;;;;

mov ah, 2Ch ;Get current time (new time)
int 21h

pop ax ;Get back old seconds

sub dh,ah ;New seconds - Old Seconds = difference

js YAdd ;If the subtraction changed the sign flag (rollover), we need to add 60 to the result
jmp NAdd ;Otherwise, go ahead and subtract 3 from the difference to check.

YAdd: ;If there was a rollover, add 60 to the difference
add dh,60

NAdd: ;There was no rollover just continue
sub dh,3 ;Difference - 3

jz Over ;If the difference between the seconds is 3 (3 - 3 = 0), we're done counting
jnz CheckTime ;Otherwise, repeat loop and continue to check the time.

Over:

ret
DoorWait ENDP

BypassP PROC
mov BypassV, 1
mov esi, OFFSET ArrayU
mov edi, OFFSET ArrayD
L1:
mov BYTE PTR [esi], 99
mov BYTE PTR [edi], 99
add esi, 1
add edi, 1
cmp esi, 15
jz Done
jmp L1
Done:
mov BypassV, 0
mov AlarmV, 0
mov Counter, 0
mov TravelCounter, 0
mov InsideB, 0
mov OutsideB, 0
mov Up, 0
mov Down, 0
mov Closed, 1
mov Open, 0
mov Floor, 0
mov NextFloor, 0
mov Difference, 0
mov ArraySizeU, 0
mov ArraySizeD, 0
ret
BypassP ENDP

AlarmP PROC
mov AlarmV, 1
mov esi, OFFSET ArrayU
mov edi, OFFSET ArrayD
L1:
mov BYTE PTR [esi], 99
mov BYTE PTR [edi], 99
add esi, 1
add edi, 1
cmp esi, 15
mov Counter, 0
mov Closed, 1
mov Open, 0
jz Done
jmp L1
Done:
jmp Move
AlarmP ENDP

DisplayP PROC USES eax edx
call ClrScr

cmp Floor, 0
jz Floor0
cmp Floor, 1
jz Floor1
cmp Floor, 2
jz Floor2
cmp Floor, 3
jz Floor3

Floor0:
mov edx, OFFSET msgSegment1
call WriteString
mov edx, OFFSET msgSegment2
call WriteString
mov edx, OFFSET msgSegmentF
call WriteString
mov edx, OFFSET msgSegment4
call WriteString
mov edx, OFFSET msgSegment5
call WriteString
mov edx, OFFSET msgSegment6
call WriteString
mov edx, OFFSET msgSegment7
call WriteString
jmp D1Done

Floor1:
mov edx, OFFSET msgSegmentFSR
call WriteString
mov edx, OFFSET msgSegmentFSS
call WriteString
mov edx, OFFSET msgSegmentF
call WriteString
mov edx, OFFSET msgSegment4
call WriteString
mov edx, OFFSET msgSegmentFSS
call WriteString
mov edx, OFFSET msgSegmentF
call WriteString
mov edx, OFFSET msgSegment7
call WriteString
jmp D1Done

Floor2:
mov edx, OFFSET msgSegment1
call WriteString
mov edx, OFFSET msgSegmentFSS
call WriteString
mov edx, OFFSET msgSegment3
call WriteString
mov edx, OFFSET msgSegment4
call WriteString
mov edx, OFFSET msgSegment5
call WriteString
mov edx, OFFSET msgSegment6
call WriteString
mov edx, OFFSET msgSegmentFR
call WriteString
jmp D1Done

Floor3:
mov edx, OFFSET msgSegment1
call WriteString
mov edx, OFFSET msgSegmentFSS
call WriteString
mov edx, OFFSET msgSegment3
call WriteString
mov edx, OFFSET msgSegment4
call WriteString
mov edx, OFFSET msgSegmentFSS
call WriteString
mov edx, OFFSET msgSegment6
call WriteString
mov edx, OFFSET msgSegment7
call WriteString

D1Done:

mov edx, OFFSET msgClean
call WriteString

D2:
cmp Up, 1
jz GoingUp
cmp Down, 1
jz GoingDown
jmp D3

GoingUp:
mov edx, OFFSET msgSegmentFSR
call WriteString
mov edx, OFFSET msgSegment2
call WriteString
mov edx, OFFSET msgSegment3
call WriteString
mov edx, OFFSET msgSegment4
call WriteString
mov edx, OFFSET msgSegmentFSS
call WriteString
mov edx, OFFSET msgSegmentF
call WriteString
mov edx, OFFSET msgSegmentFR
call WriteString
jmp D4

GoingDown:
mov edx, OFFSET msgSegmentFSR
call WriteString
mov edx, OFFSET msgSegmentFSS
call WriteString
mov edx, OFFSET msgSegment3
call WriteString
mov edx, OFFSET msgSegmentFR
call WriteString
mov edx, OFFSET msgSegment5
call WriteString
mov edx, OFFSET msgSegmentF
call WriteString
mov edx, OFFSET msgSegment7
call WriteString
jmp D4

D3:
mov edx, OFFSET msgSegmentFSR
call WriteString
mov edx, OFFSET msgSegmentFSS
call WriteString
mov edx, OFFSET msgSegmentF
call WriteString
mov edx, OFFSET msgSegmentFR
call WriteString
mov edx, OFFSET msgSegmentFSS
call WriteString
mov edx, OFFSET msgSegmentF
call WriteString
mov edx, OFFSET msgSegmentFR
call WriteString

D4:
mov bl, InvalidV
cmp bl, 1
jz Invalid
mov bl, AlarmV
cmp bl, 1
jz Alarm

jmp NotSpecial

Alarm:
mov edx, OFFSET msgAlarm
call WriteString
ret

Invalid:
mov edx, OFFSET msgInvalid
call WriteString
ret

NotSpecial:

mov bl, Opening
cmp bl, 1
jz DisplayOpening

mov bl, Closing
cmp bl, 1
jz DisplayClosing
jmp OCDone

DisplayOpening:
mov edx, OFFSET msgOpening
call WriteString
jmp DisplayDone

DisplayClosing:
mov edx, OFFSET msgClosing
call WriteString
jmp DisplayDone

OCDone:

mov bl, Open
cmp bl, 1
jz DisplayOpen
jmp DisplayClosed
DisplayOpen:
mov edx, OFFSET msgOpen
call WriteString
jmp DisplayDone
DisplayClosed:
mov edx, OFFSET msgClosed
call WriteString

DisplayDone:
cmp Moving, 1
jz DisplayMoving
jmp NoMoving
DisplayMoving:
mov edx, OFFSET msgChanging
call WriteString
NoMoving:

ret
DisplayP ENDP

END main
[/aeva][/aeva]
« Last Edit: May 09, 2010, 10:24:58 PM by Novice »
Logged
Look at you, hacker: a pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?

xolik

  • King of the Geekery
  • Hacker
  • ****
  • Coolio Points: +541/-25
  • Offline Offline
  • Gender: Male
  • Posts: 5176
  • HAY GUYS
    • View Profile
Re: Elevator 1.0
« Reply #1 on: May 10, 2010, 12:13:33 AM »

huh?
Logged
Barium: What you do if CPR fails.

=-=-=-=-=-=-=-=-=-=-=
[The Fade^C Compound]
-=-=-=-=-=-=-=-=-=-=-

Wunderkind

  • Hacker
  • ****
  • Coolio Points: +419/-36
  • Offline Offline
  • Gender: Female
  • Posts: 1921
  • drunk and practicing witchcraft
    • View Profile
Re: Elevator 1.0
« Reply #2 on: May 10, 2010, 08:13:28 AM »

hawtness
Logged
Because you either live life - bruises, skinned knees and all - or you turn your back on it and start dying. -- Captain Pike
I clicked 12AX7's banner.

Novice

  • Forum Ninja
  • Hacker
  • ****
  • Coolio Points: +205/-10
  • Offline Offline
  • Gender: Male
  • Posts: 1463
  • Thread Killer 3.0
    • View Profile
Re: Elevator 1.0
« Reply #3 on: May 10, 2010, 08:43:52 AM »

huh?

Perhaps I'll add that I promised ivan I'd post the code once it was done(ish). Hence . . there it be.
Logged
Look at you, hacker: a pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?

Clear_Runway

  • Wannabe Professional Blogger
  • **
  • Coolio Points: +85/-219
  • Offline Offline
  • Gender: Male
  • Posts: 559
  • Apparently sucks at IRC
    • View Profile
Re: Elevator 1.0
« Reply #4 on: May 10, 2010, 09:55:54 AM »

what was wrong with the way they did it before computers?
Logged
"Scatman, fat man, black and white an brown man, tell me 'bout the color of your soul"
- RIP Scatman John

http://themanicnerd.blogspot.com/

Wunderkind

  • Hacker
  • ****
  • Coolio Points: +419/-36
  • Offline Offline
  • Gender: Female
  • Posts: 1921
  • drunk and practicing witchcraft
    • View Profile
Re: Elevator 1.0
« Reply #5 on: May 10, 2010, 10:18:02 AM »

It wasn't as fun.
Logged
Because you either live life - bruises, skinned knees and all - or you turn your back on it and start dying. -- Captain Pike
I clicked 12AX7's banner.

ivan

  • Forum Moderator
  • Hacker
  • *
  • Coolio Points: +499/-50
  • Offline Offline
  • Posts: 4929
  • Not a Mod, nor a Rocker. A Mocker.
    • View Profile
Re: Elevator 1.0
« Reply #6 on: May 10, 2010, 10:53:40 AM »

Totally cool, Novice!
Logged
"I TYPE 120 WORDS PER MINUTE, BUT IT'S IN MY OWN LANGUAGE!"  -Detta

xolik: WHERE IS OBAMA'S GIFT CERTIFICATE?
Demosthenes: Is that from the gifters movement?


Detta: Crappy old shorts and a tank top.  This is how I dress for work. Because my job is to get puked on.
Demosthenes: So is mine.  I work in IT.


bananaskittles: The world is 4chan and God is a troll.

Novice

  • Forum Ninja
  • Hacker
  • ****
  • Coolio Points: +205/-10
  • Offline Offline
  • Gender: Male
  • Posts: 1463
  • Thread Killer 3.0
    • View Profile
Re: Elevator 1.0
« Reply #7 on: May 10, 2010, 11:04:47 AM »

I do what I can.


Edit: 170/200  :|
« Last Edit: May 16, 2010, 10:34:34 PM by Novice »
Logged
Look at you, hacker: a pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?

ivan

  • Forum Moderator
  • Hacker
  • *
  • Coolio Points: +499/-50
  • Offline Offline
  • Posts: 4929
  • Not a Mod, nor a Rocker. A Mocker.
    • View Profile
Re: Elevator 1.0
« Reply #8 on: May 24, 2010, 12:54:53 PM »

I do what I can.


Edit: 170/200  :|

Why were you dinged?
Logged
"I TYPE 120 WORDS PER MINUTE, BUT IT'S IN MY OWN LANGUAGE!"  -Detta

xolik: WHERE IS OBAMA'S GIFT CERTIFICATE?
Demosthenes: Is that from the gifters movement?


Detta: Crappy old shorts and a tank top.  This is how I dress for work. Because my job is to get puked on.
Demosthenes: So is mine.  I work in IT.


bananaskittles: The world is 4chan and God is a troll.

Novice

  • Forum Ninja
  • Hacker
  • ****
  • Coolio Points: +205/-10
  • Offline Offline
  • Gender: Male
  • Posts: 1463
  • Thread Killer 3.0
    • View Profile
Re: Elevator 1.0
« Reply #9 on: May 24, 2010, 01:09:07 PM »

I haven't gotten it back so I really have no idea. Ended up with an A- so I'm not too worried about it. I'm assuming it was due to a few logic errors in the queue system.
Logged
Look at you, hacker: a pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?

ivan

  • Forum Moderator
  • Hacker
  • *
  • Coolio Points: +499/-50
  • Offline Offline
  • Posts: 4929
  • Not a Mod, nor a Rocker. A Mocker.
    • View Profile
Re: Elevator 1.0
« Reply #10 on: May 24, 2010, 01:14:06 PM »

I'm thinking of copypastaing your code on a memory stick and then next time I'm in a skyscraper downtown I'll figure out a way to drop it onto their system so I can try it out real time. I'll let you know.
Logged
"I TYPE 120 WORDS PER MINUTE, BUT IT'S IN MY OWN LANGUAGE!"  -Detta

xolik: WHERE IS OBAMA'S GIFT CERTIFICATE?
Demosthenes: Is that from the gifters movement?


Detta: Crappy old shorts and a tank top.  This is how I dress for work. Because my job is to get puked on.
Demosthenes: So is mine.  I work in IT.


bananaskittles: The world is 4chan and God is a troll.

Wunderkind

  • Hacker
  • ****
  • Coolio Points: +419/-36
  • Offline Offline
  • Gender: Female
  • Posts: 1921
  • drunk and practicing witchcraft
    • View Profile
Re: Elevator 1.0
« Reply #11 on: May 24, 2010, 01:15:52 PM »

You say that to all the college students who write up an elevator code, don't you?
Logged
Because you either live life - bruises, skinned knees and all - or you turn your back on it and start dying. -- Captain Pike
I clicked 12AX7's banner.

Novice

  • Forum Ninja
  • Hacker
  • ****
  • Coolio Points: +205/-10
  • Offline Offline
  • Gender: Male
  • Posts: 1463
  • Thread Killer 3.0
    • View Profile
Re: Elevator 1.0
« Reply #12 on: May 24, 2010, 01:39:46 PM »

I'm thinking of copypastaing your code on a memory stick and then next time I'm in a skyscraper downtown I'll figure out a way to drop it onto their system so I can try it out real time. I'll let you know.

It's funny you say that. The original project description was to write code to make an elevator here on campus more efficient. It also mentioned using infrared sensors for the doors / to see what floor it was on / when to brake, etc . .

Of course, my program doesn't have any of that because if it did, it wouldn't work. If I was waiting for sensor data in the program, it would never actually run on my or the professor's computer. You could consider your system time to be the "sensors", I guess . . But my program to run a virtual elevator and a program to run a real elevator are two different things.

I realize that you may be trying for the funny with what you said, but my professor just confused the hell out of me. I guess what I mean is if you do that, make sure you are on the ground floor.
Logged
Look at you, hacker: a pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?

ivan

  • Forum Moderator
  • Hacker
  • *
  • Coolio Points: +499/-50
  • Offline Offline
  • Posts: 4929
  • Not a Mod, nor a Rocker. A Mocker.
    • View Profile
Re: Elevator 1.0
« Reply #13 on: May 24, 2010, 01:55:59 PM »


I realize that you may be trying for the funny with what you said...

Trying? TRYING?

ouch

Logged
"I TYPE 120 WORDS PER MINUTE, BUT IT'S IN MY OWN LANGUAGE!"  -Detta

xolik: WHERE IS OBAMA'S GIFT CERTIFICATE?
Demosthenes: Is that from the gifters movement?


Detta: Crappy old shorts and a tank top.  This is how I dress for work. Because my job is to get puked on.
Demosthenes: So is mine.  I work in IT.


bananaskittles: The world is 4chan and God is a troll.

ivan

  • Forum Moderator
  • Hacker
  • *
  • Coolio Points: +499/-50
  • Offline Offline
  • Posts: 4929
  • Not a Mod, nor a Rocker. A Mocker.
    • View Profile
Re: Elevator 1.0
« Reply #14 on: May 24, 2010, 01:57:31 PM »

You say that to all the college students who write up an elevator code, don't you?

Only one way to find out!
Logged
"I TYPE 120 WORDS PER MINUTE, BUT IT'S IN MY OWN LANGUAGE!"  -Detta

xolik: WHERE IS OBAMA'S GIFT CERTIFICATE?
Demosthenes: Is that from the gifters movement?


Detta: Crappy old shorts and a tank top.  This is how I dress for work. Because my job is to get puked on.
Demosthenes: So is mine.  I work in IT.


bananaskittles: The world is 4chan and God is a troll.

Novice

  • Forum Ninja
  • Hacker
  • ****
  • Coolio Points: +205/-10
  • Offline Offline
  • Gender: Male
  • Posts: 1463
  • Thread Killer 3.0
    • View Profile
Re: Elevator 1.0
« Reply #15 on: May 24, 2010, 02:21:00 PM »

Logged
Look at you, hacker: a pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?