Git Product home page Git Product logo

cpm-cal's People

Contributors

kevinboone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mike632t

cpm-cal's Issues

Simplify linking ?

I like your style (and I may borrow some of your ideas) but I was wondering if you knew that you can automatically link in relocatable object files using .REQUEST ?

e.g

.REQUEST    CONIO

Using this feature of the Microsoft Macro assembler might allow you to simplify the link command making it a little easier to rebuild the binary on CPM itself...

Specify entry point in main

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 

Error after rebuilding binary from source

I can execute the (renamed) prebuilt binary no problem

$ cpm calendar.com 
No RTC: give month and year
Usage: cal [/hsv] {month} {4-digit year}

$cpm cal 2 1963
February 1963
Mo Tu We Th Fr Sa Su
             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 
$

And, after tweaking the make file slightly I can rebuild the binary from source without any errors

$ make all
cpm ../macro =conio.asm

No Fatal error(s)
cpm ../macro =main.asm

No Fatal error(s)
cpm ../macro =intmath.asm

No Fatal error(s)
cpm ../macro =string.asm

No Fatal error(s)
cpm ../macro =mem.asm

No Fatal error(s)
cpm ../macro =clargs.asm

No Fatal error(s)
cpm ../macro =date.asm

No Fatal error(s)
cpm ../macro =romwbw.asm

No Fatal error(s)
cpm ../link main,conio,intmath,string,mem,clargs,date,romwbw,cal/n/e

Data    0103    0997    < 2196>

51647 Bytes Free
[0000   0997        9]
$

However attempting to execute it doesn't have the expected result...

$ cpm cal
cpm: HALT instruction executed
$ 

simh (build 0fa5807e) also gives up, but is a little more informative!

A>cal 2 1963

HALT instruction, PC: 00132 (HALT)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.