Professional Documents
Culture Documents
Introduction Microprocessor EASY 68
Introduction Microprocessor EASY 68
1) QUICK START
START ORG $1000
LEA MESSAGE, A1 ;LEA=Load Effective Address, so command ni load address of the item labeled
MESSAGE into address register A1
MOVE.B #13,D0 ; Display the NULL terminated string at (A1) with CR, LF.
TRAP #15 ; Trap #15 does a simulator input or output command based on the contents of D0
(skrg D0=13
MOVE.B #9,D0 ;trap task 9 utk halt simulator
TRAP #15
MESSAGE DC.B 'HELLO WORLD',0
END START ;ending dekat ape yg kita start. klau before org tu guna habis ke, lepas END ni habis la.
*********since null terminated, bila declare dekat dc.b string tu kena letak ,0
2) QUICK START SELANG
START ORG $1000
LEA MESSAGE, A1
MOVE.B #13,D0 ; Task 13 trap is to display the NULL terminated string at (A1) with CR, LF. kalau trap
14 without CR LF
TRAP #15 ; Trap #15 does a simulator input or output command based on the contents of D0 (skrg
D0=13 which is task 13)
MOVE.B #9,D0
TRAP #15 ;task 9 is to terminate the program. (Halts the simulator)
CR EQU $0D
LF EQU $0A
MESSAGE DC.B 'HELLO WORLD', CR, LF
DC.B 'GOODBYE EVERYONE!!!!!!', CR, LF,CR, LF, CR, LF ;kaleau CR, LF dua kali maksudnya selang
sebaris
DC.B 'HAHAHAHA', CR,LF
DC.B 'K SHUT UP PEOPLE', 0
END START
3) QUICK START SELANG DALAM SEBARIS
START ORG $1000
LEA MESSAGE, A1
MOVE.B #13,D0
TRAP #15
MOVE.B #9,D0
TRAP #15
CR EQU $0D ;value ni penting. kalau tukar nama CR pun tape tp kena EQU $0D
LF EQU $0A ;sama case dgn CR
MESSAGE DC.B 'HELLO WORLD',CR,LF,'NOTY SANGATLAH U ALLS NI', CR, LF ;boleh buat byk baris
dlm satu coding
DC.B 'GOODBYE EVERYONE!!!!!!', CR, LF,CR, LF, CR, LF
DC.B 'HAHAHAHAHA', CR,LF
DC.B 'K SHUT UP PEOPLE', 0
END START