Changes

Jump to: navigation, search

ASSEMBLER PASMO JP

755 bytes added, 20:57, 13 December 2020
マクロ概要
[訳注sample:jumptable.asm]
; jumptabletmacro.asm ; Test Some tests of ## operatormacro usage.
org 100h; To run in cp/m
bdos equ 5start:
conin equ 1 pstring equ 9macro bdos, function
start jp init ld c, function call 5
jpfunc macro nfunc
jp function_ ## nfunc
endm
lineend macro ld e, 0Dh bdos 2 ld e, 0Ah bdos 2 endm macro pushall push af push bc push de push hl endm popall macro pop hl pop de pop bc pop af endm ; Another way. pall macro operation irp reg, af, bc, de, hl local i1 operation reg endm endm pushall2 macro pall push endm popall2 macro irp reg, af, bc, de, hl pop reg endm endm ; Yet another way pushmany macro reg rept -1 if nul reg exitm endif push reg .shift endm endm pushall3 macro pushmany af, bc, de, hl endm ; Main program ; pushall ; pushall2 pushall3 ld de, hello i1 bdos 9 i2: lineend ;popall popall2 bdos 0 hello db 'Hello, world.$' end start ; End of tmacro.asm
=マクロディレクティブ=

Navigation menu