Skip to content

Commit

Permalink
Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
martinwoodward committed Sep 30, 2019
0 parents commit 97de88e
Show file tree
Hide file tree
Showing 7 changed files with 252 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* binary
154 changes: 154 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf


#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac desktop service store files
.DS_Store
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM micheldebree/docker-acme:latest AS build
COPY hello.asm /root
RUN acme --cpu 6510 --format cbm --outfile hello.prg hello.asm

FROM ethomson/cloud64:latest AS runtime
COPY --from=build /root/hello.prg /app/wwwroot/program.prg

WORKDIR /app
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
hello.d64: hello.asm
acme --cpu 6510 --format cbm --outfile hello.prg hello.asm
c1541 -format foo,id d64 hello.d64 -write hello.prg
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Hello World for the Commodore 64
================================

This is a simple "Hello World" application for the Commodore 64 in ACME
6502 assembly.

Derived from and inspired by
[Sylvain Poitras](https://github.com/spoitras/Hello-World)
and
[Rocco Di Leo](https://dustlayer.com/c64-coding-tutorials/2013/4/8/episode-2-2-writing-to-the-c64-screen).
45 changes: 45 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Docker
# Build and push an image to Azure Container Registry
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker

trigger:
- master

resources:
- repo: self

variables:
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: 'ethomsondemo-acr'
imageRepository: 'hello64'
containerRegistry: 'ethomsondemo.azurecr.io'
dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'
tag: '$(Build.BuildId)'

# Agent VM image name
vmImageName: 'ubuntu-latest'

stages:
- stage: Build
displayName: Build and push stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository: $(imageRepository)
dockerfile: $(dockerfilePath)
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)
- task: AzureWebAppContainer@1
displayName: Configure Web App with new container image
inputs:
azureSubscription: 'Azure DevOps Community Demo(1a1d858c-e6fb-4704-bdba-70f24b3044c0)'
appName: 'cloud64'
containers: '$(containerRegistry)/$(imageRepository):$(tag)'
31 changes: 31 additions & 0 deletions hello.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
!cpu 6502

; set up basic bootstrapper into 6502 code
* = $0801
!byte $0d,$08,$dc,$07,$9e,$20,$34,$39
!byte $31,$35,$32,$00,$00,$00
* = $c000

; clear the screen
jsr $e544

; write a line of text; loop
.loop
jsr .write_line
jmp .loop

; the text to write
message !scr " hello ndc! "

.write_line
ldx #$00

; load the next character from the message and write it to the screen.
; loop until we've reached 40 characters
.write_char
lda message,x
sta $0590,x
inx
cpx #$28
bne .write_char
rts

0 comments on commit 97de88e

Please sign in to comment.