10 include "parser_number.zas"
12 $printf "parser_number size: %d", csizeend-csizestart
15 include "parser_expr.zas"
17 $printf "parser_expr size: %d", csizeend-csizestart
20 $printf "total assembler size: %d", totalasm_end-totalasm_start
22 ; so they won't clutter symbol table
29 $printf "label manager size: %d", csizeend-csizestart
34 $printf "ouput system size: %d", csizeend-csizestart
37 ;include "output_driver_std.zas"
38 include "output_driver_4x8.zas"
40 $printf "printing driver size: %d", csizeend-csizestart
42 ; so they won't clutter symbol table
54 ld hl,expr_error_jrfar_cb
55 ld (BZ80ASM.ASM_JR_TOO_FAR_CB),hl
62 ; print line to assemble
81 push ix ; save code destination
82 push iy ; we'll need it for listing
84 ;call EXPR_STACK_RESET
113 ; if terminator, don't try to assemble more
119 jr list_and_error_no_label_check
124 ld a,(BZ80ASM.ASM_BAD_B)
128 list_and_error_no_label_check:
132 pop hl ; current position in text buffer
133 pop de ; initial position
138 ; de: print from here
173 errline: defx "---------"
180 defm "label cp 69",13
181 defm "call 0BEEFh",13
187 defm "ld e,427%10",13
188 defm "ld bc,2+3*5",13
189 defm "ld bc,0+(2+3)*5",13
190 defm "ld bc,[2+3]*5",13
191 defm "ld bc,(2+3)*5",13
192 defm "ld hl,16384",13
193 defm "ld hl,#4001",13
194 defm "ld a,(ix-2)",13
196 defm "ld de,$1234",13
197 defm "ld bc,0x5b02",13
198 defm "ld a,0b1001",13
200 defm "ld ix,-1234",13
201 defm "ld iy,-0x602a",13
205 defm "defb 7&$c,1|2,1|(3^1),1<<15",13
207 defm "defm '012','34'",13
213 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
216 ;; extracted from assembler code, because we don't need it there
219 ;; IY: current position in text buffer
220 ;; IX: current position in code buffer
221 ;; BC: starting position in text buffer
222 ;; DE: starting position in code buffer
227 ;COUNT: defb 0 ;PRINT POSITION
229 ; calculate code length
239 ; calculate original PC
252 ; print code bytes (if there are any)
257 ; do not print code if more than 4 bytes (long strings and dbs)
260 ; do not print code if more than 4 bytes (long strings and dbs)
290 ; print source line, from BC to IY (exclusive)
291 ; calculate string length
317 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
319 ;; print byte in hex with the trailing space
327 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;