pdp-11

Optimizing comparison instruction count (PDP-11)

For PDP-11, how can I change the following snippet of assembly so that it's only two instructions, yet does the same work as these four? tst r0 blt label cmp r0, #75 bgt label ...

program on Assembly

hello, can somebody please explain what this program is doing? .= torg + 1000 main: mov pc, sp tst –(sp) mov #list1, -(sp) jsr pc, mystery mov r0, res1 tst (sp)+ mov #list2, -(sp) jsr pc, mystery mov r0, res2 tst (sp)+ halt mystery: mov...

insertion sort for pdp-11

I'm studying pdp-11 and assembly, I'm very interested, is it possible to find insertion sort on assembly for pdp-11, thanks in advance for everyone, if yes where? ...

Architecture in Eclipse

How can I change architecture in Eclipse from x86 to pdp11, what flags do I need, and do I need adjust cross-compiler, thanks in advance ...

sub-routines on Assembly

can I do something like this on Assembly bne jsr swap, if not how can I solve this problem from C, thanks in advance if(start!=pivot_index){ swap(board,start,pivot_index); } I was taught that I must write jsr and sub-routine but can I do something like this bne sub-routine ...

swap on assembly

I wrote swap on assembly, but I'm not sure that my code is right, this is the code swap: mov r1, -(sp) mov (sp) r1 mov 2(sp) (sp) mov r1 2(sp) mov (sp)+, r1 rts pc swap receives pointer from stack ...

Question on Addressing Modes in PDP-11 Assembler

I have small question about pdp-11(simulator), I have this command (it begins from the address 1000) add 2500, #2500 and this initial list: register/address - initial value pc 1000 sp 600 2500 3000 and I want to know how this small snippet exactly runs, in my booklet I found that: firstly...

assembly of pdp-11(simulator)

I have this code on pdp-11 tks = 177560 tkb = 177562 tps = 177564 tpb = 177566 lcs = 177546 . = torg + 2000 main: mov #main, sp mov #kb_int, @#60 mov #200, @#62 mov #101, @#tks mov #clock, @#100 mov #300, @#102 mov #100, @#lcs loop: mov @#tks,r2 aslb r2 bmi loop ...

printer in pdp-11

I have this snippet of the code. can somebody explain why It doesn't work, I want every 5 seconds print "Syntax Error" thanks in advance tks = 177560 tkb = 177562 tps = 177564 tpb = 177566 lcs = 177546 . = torg + 2000 main: mov #main, sp mov #outp, @#64 mov #200, @#66 mov #clock, @#100 mov #300, @#102 mov #101,...

clock on pdp-11

hello, I'm a little bit confused about simple program which I wrote, can You please explain why it quits after printing only one character, I expected it will print me character every 5 seconds, thanks in advance tks = 177560 tkb = 177562 tps = 177564 tpb = 177566 lcs = 177546 . = torg + 2000 main: mov #main, sp mov #clock, ...