Other PDP-11 assemblers include PAL-11R, PAL-11S and MACRO-11. This is Dennis Ritchie's Unix Assembler ("as"). Start 100 / tells assembler where program starts PDP-11 Assembly Msg, text "hello, world" / 3 6-bit fiodec chars packed into each 18-bit word Ptr, msg / pointer to current word in message Jmp lup / otherwise do next word in message Sas end / skip next instr if pointer passes the end of message If youd rather have File Explorer open to This PC, on the ribbon, select See more > Options > Open File Explorer to. Idx ptr / increment pointer to next word in message Jmp lu2 / otherwise do next character in current word Sza / skip next instr if accumulator is zero Tyo / type out character in 6 right-most bits of io reg left 6 bits in ac move into right 6 bits of io reg Lu2, rcl 6s / rotate combined ac + io reg 6 bits to the left Lup, lac i ptr / load ac from address stored in pointer below: location specifier - told assembler what address to assemble to above: title line - was punched in human readable letters on paper tape The third section starts the loop of displaying the characters, waiting for the delay time, incrementing the pointer, decrementing the counter, and checking if the counter is negative to know whether to continue the loop. The second sets up the loop by loading a delay of 500 milliseconds to slot 3, the start address of the character array in memory to slot 2, and the number of times to loop (14) plus one to slot 5. The first stores the character numbers in order in an array. The code can be divided into three sections. The top two vertical bars are assigned bits 5 and 4 while the bottom two vertical bars are assigned bits 2 and 1 from left to right.īecause DDNC can only interpret literals in decimal, each binary number was converted and stored in consecutive memory cells starting at cell 10. The three horizontal bars are assigned bits 6, 3, and 0 from top to bottom. $ write sys$output "Hello world!" DDNC ĭDNC can only output to a single 7-segment LED display digit, so first we must convert each character into its 7-segment equivalent numerical value. Outeee = $e1d1 ROM: console putchar routine reg a holds the ascii char to be output for hosting Michael Holley's documents! SWTPC 6800 system, which is the target device for terminal (console) connected to a 1970s vintage Prints the message "Hello world!" to an ascii
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |