Specify entry point in main
Opened this issue · 0 comments
mike632t commented
It is probably simpler to simpler to specify the code entry point in main rather than 'mess about' with ASEG and /P directives (there are I suspect perfectly good reasons for using these directives it you want code to burn into a ROM but I've always let the linker just do its' thing).
main.asm
;------------------------------------------------------------------------
;
; CAL utility
;
; main.asm
;
; Copyright (c)2021 Kevin Boone, GPL v3.0
;
;------------------------------------------------------------------------
.Z80
; ASEG
; ORG 0100H
include CONIO.INC
include CLARGS.INC
include INTMATH.INC
include DATE.INC
include STRING.INC
include ROMWBW.INC
.request conio
.request clargs
.request intmath
.request date
.request string
.request romwbw
.request mem
; JP main
rtcse: ; sec
db 0
end main
Makefile
$(TARGET): conio.rel main.rel intmath.rel string.rel mem.rel clargs.rel date.rel romwbw.rel
$(CPM) $(LINK80) main,$(NAME)/n/e
The result should be an executable that starts with a jump to the entry point...
0100 C37C01C3 7C01E521 1A03CDE3 0321D502 .|..|..!.....!..
0110 CDE303E1 C9E52145 03CDE303 E1C9D5CD ......!E........
0120 0308B7CA 73027BB7 CA7302FE 0DD27302 ....s.{..s....s.
I'm not sure if the month should be indented but it seems to work..
cpm cal 8 2023 /s
August 2023
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31