Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;:ts=8
- R0 equ 1
- R1 equ 5
- R2 equ 9
- R3 equ 13
- ;struct wario {
- ; unsigned char money;
- ; unsigned short gold;
- ; unsigned short wares;
- ;};
- ;
- ;
- ;struct wario bbb;
- ;
- ;void main() {
- code
- xdef __main
- func
- __main:
- longa on
- longi on
- tsc
- sec
- sbc #L2
- tcs
- phd
- tcd
- ; struct wario aaa;
- ;
- ; aaa.money = 5;
- aaa_1 set 0
- sep #$20
- longa off
- lda #$5
- sta <L3+aaa_1
- rep #$20
- longa on
- ; aaa.gold = 5;
- lda #$5
- sta <L3+aaa_1+1
- ; aaa.wares = aaa.money + 15;
- lda <L3+aaa_1
- and #$ff
- clc
- adc #$f
- sta <L3+aaa_1+3
- ;
- ; bbb.money = 7;
- sep #$20
- longa off
- lda #$7
- sta |__bbb
- rep #$20
- longa on
- ; bbb.gold = 7;
- lda #$7
- sta |__bbb+1
- ; bbb.wares = aaa.money + 17;
- lda <L3+aaa_1
- and #$ff
- clc
- adc #$11
- sta |__bbb+3
- ;
- ; aaa = bbb;
- pea #<__bbb
- clc
- tdc
- adc #<L3+aaa_1
- pha
- lda #$5
- xref __~mov
- jsr __~mov
- ;}
- pld
- tsc
- clc
- adc #L2
- tcs
- rts
- L2 equ 9
- L3 equ 5
- ends
- efunc
- ;
- udata
- xdef __bbb
- __bbb
- ds 5
- ends
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement