Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golden tests #2

Merged
merged 5 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion asm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,31 @@ repositories {
}

application {
mainClass = "MainKt"
mainClass = "io.github.zerumi.csa3.asm.MainKt"
}

dependencies {
implementation(project(":isa"))
testImplementation("org.jetbrains.kotlin:kotlin-test")
}

tasks.withType(Jar::class) {
manifest {
attributes["Manifest-Version"] = "1.0"
attributes["Main-Class"] = "MainKt"
}
// To avoid the duplicate handling strategy error
duplicatesStrategy = DuplicatesStrategy.EXCLUDE

// To add all the dependencies
from(sourceSets.main.get().output)

dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}

tasks.test {
useJUnitPlatform()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
package io.github.zerumi.csa3.asm

import io.github.zerumi.csa3.isa.writeCode

fun main(args: Array<String>) {
val sourceFile = args[0]
val targetFile = args[1]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
package io.github.zerumi.csa3.asm

import io.github.zerumi.csa3.isa.MemoryCell
import io.github.zerumi.csa3.isa.Opcode
import io.github.zerumi.csa3.isa.Program
import java.io.File

private fun meaningfulToken(line: String): String {
Expand Down
1 change: 0 additions & 1 deletion asm/src/main/resources/examples/hello.sasm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ hello_str:
word 33 ; '!'
word 0 ; \0


print_char:
lit port ; symbol port_addr
load ; symbol port
Expand Down
Loading
Loading